home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-03-24 | 150.2 KB | 5,311 lines | [TEXT/????] |
-
- char yysccsid[] = "@(#)yaccpar 1.4 (Berkeley) 02/25/90";
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- typedef unsigned int size_t;
-
-
-
-
-
-
-
-
-
-
-
-
- void *memcpy (void *s1, const void *s2, size_t n);
- void *memmove (void *s1, const void *s2, size_t n);
- char *strcpy (char *s1, const char *s2);
- char *strncpy (char *s1, const char *s2, size_t n);
-
-
-
-
-
-
-
-
-
- char *strcat (char *s1, const char *s2);
- char *strncat (char *s1, const char *s2, size_t n);
-
-
-
-
-
- int memcmp (const void *s1, const void *s2, size_t n);
- int strcmp (const char *s1, const char *s2);
- int strcoll (const char *s1, const char *s2);
- int strncmp (const char *s1, const char *s2, size_t n);
- size_t strxfrm (char *s1, const char *s2, size_t n);
-
-
-
-
-
-
- void *memchr (const void *s, int c, size_t n);
- char *strchr (const char *s, int c);
- size_t strcspn (const char *s1, const char *s2);
- char * strpbrk (const char *s1, const char *s2);
- char *strrchr (const char *s, int c);
- size_t strspn (const char *s1, const char *s2);
- char *strstr (const char *s1, const char *s2);
- char *strtok (char *s1, const char *s2);
-
-
-
-
-
-
- void *memset (void *s, int c, size_t n);
- char *strerror (int errnum);
- size_t strlen (const char *s);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- typedef char *va_list;
-
-
-
-
-
-
-
- typedef struct {
- int _cnt;
- unsigned char *_ptr;
- unsigned char *_base;
- unsigned char *_end;
- unsigned short _size;
- unsigned short _flag;
- unsigned short _file;
- } FILE;
-
-
-
-
-
-
-
- typedef long fpos_t;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- int remove(const char *filename);
- int rename(const char *oldname, const char *newname);
- FILE *tmpfile(void);
- char *tmpnam(char *s);
-
-
-
-
-
-
- int fclose(FILE *stream);
- int fflush(FILE *stream);
- FILE *fopen(const char *filename, const char *mode);
- FILE *freopen(const char *filename, const char *mode, FILE *stream);
- void setbuf(FILE *stream, char *buf);
- int setvbuf(FILE *stream, char *buf, int mode, size_t size);
-
-
-
-
-
-
- int fprintf(FILE *stream, const char *format, ...);
- int fscanf(FILE *stream, const char *format, ...);
- int printf(const char *format, ...);
- int scanf(const char *format, ...);
- int sprintf(char *s, const char *format, ...);
- int sscanf(const char *s, const char *format, ...);
- int vfprintf(FILE *stream, const char *format, va_list arg);
- int vprintf(const char *format, va_list arg);
- int vsprintf(char *s, const char *format, va_list arg);
-
-
-
-
-
-
- int fgetc(FILE *stream);
- char *fgets(char *s, int n, FILE *stream);
- int fputc(int c, FILE *stream);
- int fputs(const char *s, FILE *stream);
- int getc(FILE *stream);
-
- int getchar(void);
-
- char *gets(char *s);
- int putc(int c, FILE *stream);
-
-
-
- int putchar(int c);
-
- int puts(const char *s);
- int ungetc(int c, FILE *stream);
-
-
-
-
-
-
- size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
- size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
-
-
-
-
-
-
- int fgetpos(FILE *stream, fpos_t *pos);
- int fseek(FILE *stream, long int offset, int whence);
- int fsetpos(FILE *stream, const fpos_t *pos);
- long int ftell(FILE *stream);
- void rewind(FILE *stream);
-
-
-
-
-
-
- void clearerr(FILE *stream);
-
- int feof(FILE *stream);
-
- int ferror(FILE *stream);
-
- void perror(const char *s);
-
-
-
-
-
- extern FILE _iob[];
-
- int _filbuf(FILE *);
- int _flsbuf(unsigned char, FILE *);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- typedef unsigned char Byte;
- typedef char SignedByte;
- typedef char *Ptr;
- typedef Ptr *Handle;
-
- typedef long Fixed;
- typedef Fixed *FixedPtr;
- typedef long Fract;
- typedef Fract *FractPtr;
-
-
-
-
-
-
-
- typedef extended extended80;
-
-
-
- enum {false,true};
- typedef unsigned char Boolean;
-
- enum {v,h};
- typedef unsigned char VHSelect;
-
-
- typedef long (*ProcPtr)();
- typedef ProcPtr *ProcHandle;
-
- typedef unsigned char Str255[256],Str63[64],Str32[33],Str31[32],Str27[28],Str15[16],*StringPtr,**StringHandle;
-
-
-
-
-
-
-
- typedef const unsigned char *ConstStr255Param;
- typedef ConstStr255Param ConstStr63Param,ConstStr32Param,ConstStr31Param,
- ConstStr27Param,ConstStr15Param;
-
- typedef short OSErr;
- typedef unsigned long OSType;
- typedef OSType *OSTypePtr;
- typedef unsigned long ResType;
- typedef ResType *ResTypePtr;
- typedef unsigned char Style;
- typedef short ScriptCode;
- typedef short LangCode;
-
-
- struct Point {
- short v;
- short h;
- };
-
- typedef struct Point Point;
- typedef Point *PointPtr;
-
- struct Rect {
- short top;
- short left;
- short bottom;
- short right;
- };
-
- typedef struct Rect Rect;
- typedef Rect *RectPtr;
-
-
-
-
-
- pascal void Debugger(void)
- = 0xA9FF;
- pascal void DebugStr(ConstStr255Param aStr)
- = 0xABFF;
- void debugstr(char *aStr);
- pascal void SysBreak(void)
- = {0x303C,0xFE16,0xA9C9};
- pascal void SysBreakStr(ConstStr255Param debugStr)
- = {0x303C,0xFE15,0xA9C9};
- pascal void SysBreakFunc(ConstStr255Param debugFunc)
- = {0x303C,0xFE14,0xA9C9};
-
-
-
-
-
-
-
-
-
-
-
- enum {
-
- maxSize = 0x800000,
- defaultPhysicalEntryCount = 8,
-
-
- kPageInMemory = 0,
- kPageOnDisk = 1,
- kNotPaged = 2
- };
-
- typedef long Size;
- typedef pascal long (*GrowZoneProcPtr)(Size cbNeeded);
-
- struct Zone {
- Ptr bkLim;
- Ptr purgePtr;
- Ptr hFstFree;
- long zcbFree;
- GrowZoneProcPtr gzProc;
- short moreMast;
- short flags;
- short cntRel;
- short maxRel;
- short cntNRel;
- short maxNRel;
- short cntEmpty;
- short cntHandles;
- long minCBFree;
- ProcPtr purgeProc;
- Ptr sparePtr;
- Ptr allocPtr;
- short heapData;
- };
-
- typedef struct Zone Zone;
- typedef Zone *THz;
-
- struct MemoryBlock {
- void * address;
- unsigned long count;
- };
-
- typedef struct MemoryBlock MemoryBlock;
-
- struct LogicalToPhysicalTable {
- MemoryBlock logical;
- MemoryBlock physical[defaultPhysicalEntryCount];
- };
-
- typedef struct LogicalToPhysicalTable LogicalToPhysicalTable;
-
-
- typedef short PageState;
- typedef short StatusRegisterContents;
-
-
-
-
-
- pascal THz GetZone(void)
- = 0xA11A;
-
-
-
- pascal Handle NewHandle(Size byteCount)
- = 0xA122;
- pascal Handle NewHandleSys(Size byteCount)
- = 0xA522;
- pascal Handle NewHandleClear(Size byteCount)
- = 0xA322;
- pascal Handle NewHandleSysClear(Size byteCount)
- = 0xA722;
- pascal THz HandleZone(Handle h)
- = 0xA126;
- pascal Handle RecoverHandle(Ptr p)
- = 0xA128;
- pascal Handle RecoverHandleSys(Ptr p)
- = 0xA528;
- pascal Ptr NewPtr(Size byteCount)
- = 0xA11E;
- pascal Ptr NewPtrSys(Size byteCount)
- = 0xA51E;
- pascal Ptr NewPtrClear(Size byteCount)
- = 0xA31E;
- pascal Ptr NewPtrSysClear(Size byteCount)
- = 0xA71E;
- pascal THz PtrZone(Ptr p)
- = 0xA148;
-
-
- pascal long MaxBlock(void)
- = 0xA061;
- pascal long MaxBlockSys(void)
- = 0xA461;
- pascal long StackSpace(void)
- = 0xA065;
- pascal Handle NewEmptyHandle(void)
- = 0xA166;
- pascal Handle NewEmptyHandleSys(void)
- = 0xA566;
- pascal void HLock(Handle h)
- = 0xA029;
- pascal void HUnlock(Handle h)
- = 0xA02A;
- pascal void HPurge(Handle h)
- = 0xA049;
- pascal void HNoPurge(Handle h)
- = 0xA04A;
- pascal void HLockHi(Handle h)
- = {0xA064,0xA029};
-
-
-
-
-
- pascal Ptr StripAddress(void *theAddress);
-
- pascal Ptr Translate24To32(void *addr24)
- = 0xA091;
- pascal Handle TempNewHandle(Size logicalSize,OSErr *resultCode)
- = {0x3F3C,0x001D,0xA88F};
- pascal Size TempMaxMem(Size *grow)
- = {0x3F3C,0x0015,0xA88F};
- pascal long TempFreeMem(void)
- = {0x3F3C,0x0018,0xA88F};
-
- pascal void TempHLock(Handle h,OSErr *resultCode)
- = {0x3F3C,0x001E,0xA88F};
- pascal void TempHUnlock(Handle h,OSErr *resultCode)
- = {0x3F3C,0x001F,0xA88F};
- pascal void TempDisposeHandle(Handle h,OSErr *resultCode)
- = {0x3F3C,0x0020,0xA88F};
- pascal Ptr TempTopMem(void)
- = {0x3F3C,0x0016,0xA88F};
-
- pascal Size MFMaxMem(Size *grow)
- = {0x3F3C,0x0015,0xA88F};
- pascal long MFFreeMem(void)
- = {0x3F3C,0x0018,0xA88F};
- pascal Handle MFTempNewHandle(Size logicalSize,OSErr *resultCode)
- = {0x3F3C,0x001D,0xA88F};
- pascal void MFTempHLock(Handle h,OSErr *resultCode)
- = {0x3F3C,0x001E,0xA88F};
- pascal void MFTempHUnlock(Handle h,OSErr *resultCode)
- = {0x3F3C,0x001F,0xA88F};
- pascal void MFTempDisposHandle(Handle h,OSErr *resultCode)
- = {0x3F3C,0x0020,0xA88F};
- pascal Ptr MFTopMem(void)
- = {0x3F3C,0x0016,0xA88F};
- pascal void InitApplZone(void)
- = 0xA02C;
- pascal void InitZone(GrowZoneProcPtr pgrowZone,short cmoreMasters,void *limitPtr,
- void *startPtr);
- pascal void SetZone(THz hz)
- = 0xA01B;
- pascal Size CompactMem(Size cbNeeded)
- = 0xA04C;
- pascal Size CompactMemSys(Size cbNeeded)
- = 0xA44C;
- pascal void PurgeMem(Size cbNeeded)
- = 0xA04D;
- pascal void PurgeMemSys(Size cbNeeded)
- = 0xA44D;
- pascal long FreeMem(void)
- = 0xA01C;
- pascal long FreeMemSys(void)
- = 0xA41C;
- pascal void ResrvMem(Size cbNeeded)
- = 0xA040;
- pascal void ReserveMem(Size cbNeeded)
- = 0xA040;
- pascal void ReserveMemSys(Size cbNeeded)
- = 0xA440;
- pascal Size MaxMem(Size *grow)
- = {0xA11D,0x2288};
- pascal Size MaxMemSys(Size *grow)
- = {0xA51D,0x2288};
- pascal void SetGrowZone(GrowZoneProcPtr growZone)
- = 0xA04B;
- pascal void SetApplLimit(void *zoneLimit)
- = 0xA02D;
- pascal void MoveHHi(Handle h)
- = 0xA064;
- pascal void DisposPtr(Ptr p)
- = 0xA01F;
- pascal void DisposePtr(Ptr p)
- = 0xA01F;
- pascal Size GetPtrSize(Ptr p);
- pascal void SetPtrSize(Ptr p,Size newSize)
- = 0xA020;
- pascal void DisposHandle(Handle h)
- = 0xA023;
- pascal void DisposeHandle(Handle h)
- = 0xA023;
- pascal Size GetHandleSize(Handle h);
- pascal void SetHandleSize(Handle h,Size newSize)
- = 0xA024;
- pascal void EmptyHandle(Handle h)
- = 0xA02B;
- pascal void ReallocHandle(Handle h,Size byteCount)
- = 0xA027;
- pascal void ReallocateHandle(Handle h,Size byteCount)
- = 0xA027;
- pascal void HSetRBit(Handle h)
- = 0xA067;
- pascal void HClrRBit(Handle h)
- = 0xA068;
- pascal void MoreMasters(void)
- = 0xA036;
- pascal void BlockMove(const void *srcPtr,void *destPtr,Size byteCount)
- = 0xA02E;
-
- pascal void PurgeSpace(long *total,long *contig);
- pascal char HGetState(Handle h)
- = 0xA069;
- pascal void HSetState(Handle h,char flags)
- = 0xA06A;
- pascal void SetApplBase(void *startPtr)
- = 0xA057;
- pascal void MaxApplZone(void)
- = 0xA063;
- pascal OSErr HoldMemory(void *address,unsigned long count)
- = {0x7000,0xA05C};
- pascal OSErr UnholdMemory(void *address,unsigned long count)
- = {0x7001,0xA05C};
- pascal OSErr LockMemory(void *address,unsigned long count)
- = {0x7002,0xA05C};
- pascal OSErr LockMemoryContiguous(void *address,unsigned long count)
- = {0x7004,0xA05C};
- pascal OSErr UnlockMemory(void *address,unsigned long count)
- = {0x7003,0xA05C};
- pascal OSErr GetPhysical(LogicalToPhysicalTable *addresses,unsigned long *physicalEntryCount);
- pascal OSErr DeferUserFn(ProcPtr userFunction,void *argument)
- = 0xA08F;
- pascal long DebuggerGetMax(void)
- = {0x7000,0xA08D};
- pascal void DebuggerEnter(void)
- = {0x7001,0xA08D};
- pascal void DebuggerExit(void)
- = {0x7002,0xA08D};
- pascal void DebuggerPoll(void)
- = {0x7003,0xA08D};
- pascal PageState GetPageState(const void *address)
- = {0x7004,0xA08D};
- pascal Boolean PageFaultFatal(void)
- = {0x7005,0xA08D};
- pascal OSErr DebuggerLockMemory(void *address,unsigned long count)
- = {0x7006,0xA08D};
- pascal OSErr DebuggerUnlockMemory(void *address,unsigned long count)
- = {0x7007,0xA08D};
- pascal StatusRegisterContents EnterSupervisorMode(void)
- = {0x7008,0xA08D};
-
-
-
-
-
-
-
-
-
-
-
-
-
- struct program;
- struct function;
- struct svalue;
- struct sockaddr;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- char *malloc (unsigned) ;
- char *realloc (char *, unsigned) ;
- int fclose (FILE *) ;
- int pclose (FILE *) ;
- int atoi (char *) ;
- void srandom (int) ;
- int chdir (char *) ;
- int gethostname (char *, int) ;
- void abort (void) ;
- int fflush (FILE *) ;
- int rmdir (char *) ;
- int unlink (char *) ;
- int fclose (FILE *) ;
- void qsort (char *, int, int, int (*)()) ;
- int fseek (FILE *, long, int) ;
- int _flsbuf();
- int fork (void) ;
- int wait (int *) ;
- int execl (char *, char *, ...) ;
- int pipe (int *) ;
- int dup2 (int, int) ;
- int vfork (void) ;
- void free (char *) ;
- void exit (int) ;
- void _exit (int) ;
- unsigned int alarm (unsigned int) ;
- int ioctl(int, ...);
-
- int _filbuf();
- char *crypt (char *, char *) ;
-
-
-
-
-
-
- long random (void) ;
-
-
- long strtol (char *, char **, int) ;
- int link (char *, char *) ;
- int unlink (char *) ;
-
-
- struct object;
- char *get_error_file (char *) ;
- void save_error (char *, char *, int) ;
-
- int write_file (char *, char *) ;
-
- int file_size (char *) ;
- char *check_file_name (char *, int) ;
- void remove_all_players (void) ;
- void load_wiz_file (void) ;
- void wizlist (char *) ;
- void backend (void) ;
- char *xalloc (int) ;
- char *xrealloc(char *p, unsigned int size);
- void init_string_space (void) ;
- void error();
- void fatal();
- void add_message();
- void trace_log();
- void debug_message();
- void debug_message_value (struct svalue *) ,
- print_local_commands(),
-
-
-
- new_call_out (struct object *, char *, int, struct svalue *, int) ,
-
- add_action (char *, char *, int) ,
- enable_commands (int) ,
- load_ob_from_swap (struct object *) ;
-
- int tail (char *) ;
-
- struct object *get_interactive_object (int) ;
- void enter_object_hash (struct object *) ;
- void remove_object_hash (struct object *) ;
- struct object *lookup_object_hash (char *) ;
- int show_otable_status (int verbose) ;
- void dumpstat (void) ;
- struct vector;
- void free_vector (struct vector *) ;
- char *query_load_av (void) ;
- void update_compile_av (int) ;
- struct vector *map_array (
- struct vector *arr,
- char *func,
- struct object *ob,
- struct svalue *extra
- ) ;
- struct vector *make_unique (struct vector *arr,char *func,
- struct svalue *skipnum) ;
-
- char *describe_items (struct svalue *arr,char *func,int live) ;
- struct vector *filter (struct vector *arr,char *func,
- struct object *ob, struct svalue *) ;
- int match_string (char *, char *) ;
- int set_heart_beat (struct object *, int) ;
- struct object *get_empty_object (int) ;
- struct svalue;
- void assign_svalue (struct svalue *, struct svalue *) ;
- void assign_svalue_no_free (struct svalue *to, struct svalue *from) ;
- void free_svalue (struct svalue *) ;
- char *make_shared_string (char *) ;
- void free_string (char *) ;
- int add_string_status (int verbose) ;
- void notify_no_command (void) ;
- void clear_notify (void) ;
- void throw_error (void) ;
- void set_living_name (struct object *,char *) ;
- void remove_living_name (struct object *) ;
- struct object *find_living_object (char *, int) ;
- int lookup_predef (char *) ;
- void yyerror (char *) ;
- int hashstr (char *, int, int) ;
- int lookup_predef (char *) ;
- char *dump_trace (int) ;
- int parse_command (char *, struct object *) ;
- struct svalue *apply (char *, struct object *, int) ;
- void push_string (char *, int) ;
- void push_number (int) ;
- void push_object (struct object *) ;
- struct object *clone_object (char *) ;
- void init_num_args (void) ;
- int restore_object (struct object *, char *) ;
- void tell_object (struct object *, char *) ;
- struct object *first_inventory (struct svalue *) ;
- struct vector *slice_array (struct vector *,int,int) ;
- int query_idle (struct object *) ;
- char *implode_string (struct vector *, char *) ;
- struct object *query_snoop (struct object *) ;
- struct vector *all_inventory (struct object *) ;
- struct vector *deep_inventory (struct object *, int) ;
- struct object *environment (struct svalue *) ;
- struct vector *add_array (struct vector *, struct vector *) ;
- char *get_f_name (int) ;
-
- void startshutdowngame (void) ;
-
-
-
- void set_notify_fail_message (char *) ;
- int swap (struct object *) ;
- int transfer_object (struct object *, struct object *) ;
- struct vector *users (void) ;
- void do_write (struct svalue *) ;
- void log_file (char *, char *) ;
- int remove_call_out (struct object *, char *) ;
- char *create_wizard (char *, char *) ;
- void destruct_object (struct svalue *) ;
- void set_snoop (struct object *, struct object *) ;
- int new_set_snoop (struct object *, struct object *) ;
- void add_verb (char *, int) ;
- void ed_start (char *, char *, struct object *) ;
- void say (struct svalue *, struct vector *) ;
- void tell_room (struct object *, struct svalue *, struct vector *) ;
- void shout_string (char *) ;
- int command_for_object (char *, struct object *) ;
- int remove_file (char *) ;
- int print_file (char *, int, int) ;
- int print_call_out_usage (int verbose) ;
- int input_to (char *, int) ;
- int parse (char *, struct svalue *, char *, struct svalue *, int) ;
- struct object *object_present (struct svalue *, struct object *) ;
- void add_light (struct object *, int) ;
- int indent_program (char *) ;
- void call_function (struct program *, struct function *) ;
- void store_line_number_info (void) ;
- void push_constant_string (char *) ;
- void push_svalue (struct svalue *) ;
- struct variable *find_status (char *, int) ;
- void free_prog (struct program *, int) ;
- void stat_living_objects (void) ;
- int heart_beat_status (int verbose) ;
- void opcdump (void) ;
- void slow_shut_down (int) ;
- struct vector *allocate_array (int) ;
- void yyerror (char *) ;
- void reset_machine (int) ;
- void clear_state (void) ;
- void load_first_objects (void) ;
- void preload_objects (int) ;
- int random_number (int) ;
- void reset_object (struct object *, int) ;
- int replace_interactive (struct object *ob, struct object *obf, char *) ;
- char *get_wiz_name (char *) ;
- char *get_log_file (char *) ;
- int get_current_time (void) ;
- char *time_string (int) ;
- char *process_string (char *) ;
- void update_ref_counts_for_players (void) ;
- void count_ref_from_call_outs (void) ;
- void check_a_lot_ref_counts (struct program *) ;
- int shadow_catch_message (struct object *ob, char *str) ;
- struct vector *get_all_call_outs (void) ;
- char *read_file (char *file, int, int) ;
- char *read_bytes (char *file, int, int) ;
- int write_bytes (char *file, int, char *str) ;
- struct wiz_list *add_name (char *str) ;
- char *check_valid_path (char *, struct wiz_list *, char *, int) ;
- int get_line_number_if_any (void) ;
- void logon (struct object *ob) ;
- struct svalue *apply_master_ob (char *fun, int num_arg) ;
- void assert_master_ob_loaded();
- struct vector *explode_string (char *str, char *del) ;
- char *string_copy (char *) ;
- int find_call_out (struct object *ob, char *fun) ;
- void remove_object_from_stack (struct object *ob) ;
- void compile_file (void) ;
- void unlink_swap_file();
- char *function_exists (char *, struct object *) ;
- void set_inc_list (struct svalue *sv) ;
- int legal_path (char *path) ;
- struct vector *get_dir (char *path) ;
- extern int rename (char *, char *) ;
- void get_simul_efun (struct svalue *) ;
- struct function *find_simul_efun (char *) ;
- char *query_simul_efun_file_name (void) ;
- struct vector *match_regexp (struct vector *v, char *pattern) ;
-
-
-
- union u {
- char *string;
- int number;
- struct object *ob;
- struct vector *vec;
- struct svalue *lvalue;
- };
-
-
-
-
-
-
- struct svalue {
- short type;
- short string_type;
- union u u;
- };
-
-
-
-
-
-
-
-
-
-
-
-
-
- struct vector {
- short size;
- short ref;
-
- int extra_ref;
-
- struct wiz_list *user;
- struct svalue item[1];
- };
-
-
-
-
-
- struct lnode_def;
- void free_vector (struct vector *) , free_all_values();
-
-
-
-
-
-
-
- struct control_stack {
- struct object *ob;
- struct object *prev_ob;
- struct program *prog;
- int num_local_variables;
- char *pc;
- struct svalue *fp;
- int extern_call;
- struct function *funp;
- int function_index_offset;
-
- int variable_index_offset;
- short *break_sp;
- };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- struct object {
- unsigned short flags;
- short total_light;
- int next_reset;
- int time_of_ref;
- int ref;
-
- int extra_ref;
-
- long swap_num;
- struct program *prog;
- char *name;
- struct object *next_all, *next_inv, *next_heart_beat, *next_hash;
- struct object *contains;
- struct object *super;
- struct object *shadowing;
- struct object *shadowed;
- struct interactive *interactive;
- struct sentence *sent;
- struct wiz_list *user;
- struct wiz_list *eff_user;
- struct object *next_hashed_living;
- char *living_name;
- struct svalue variables[1];
-
- };
-
- extern struct object *load_object (char *, int, int) ,
- *find_object (char *) ;
- extern struct object *get_empty_object(), *find_object (char *) ,
- *find_object2 (char *) ;
- extern struct object *current_object, *command_giver;
-
- extern struct object *obj_list;
- extern struct object *obj_list_destruct;
-
- struct value;
- void remove_destructed_objects(), save_object (struct object *, char *) ,
- move_object (struct object *, struct object *) ,
- tell_object (struct object *, char *) ,
- tell_npc (struct object *, char *) ,
- add_ref (struct object *, char *) ,
- free_object (struct object *, char *) ,
- reference_prog (struct program *, char *) ;
-
- int restore_object (struct object *, char *) ;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- struct function {
- char *name;
- unsigned short offset;
-
- unsigned short flags;
- unsigned short num_local;
- unsigned short num_arg;
-
-
- unsigned short function_index_offset;
-
-
-
- unsigned short type;
- };
-
- struct variable {
- char *name;
- unsigned short type;
- unsigned short flags;
- };
-
- struct inherit {
- struct program *prog;
- unsigned short function_index_offset;
- unsigned short variable_index_offset;
- unsigned short type;
- };
-
- struct program {
- int ref;
-
- int extra_ref;
-
- char *program;
- char *name;
- int id_number;
-
-
- unsigned short *line_numbers;
- struct function *functions;
- char **strings;
- struct variable *variable_names;
- struct inherit *inherit;
- int total_size;
- int heart_beat;
-
-
-
-
-
-
-
-
-
-
-
-
- unsigned short *argument_types;
-
- unsigned short *type_start;
-
-
-
- unsigned short program_size;
- unsigned short num_functions;
- unsigned short num_strings;
- unsigned short num_variables;
- unsigned short num_inherited;
- };
-
- extern struct program *current_prog;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- struct instr {
- short max_arg, min_arg;
- char type[2];
- short Default;
- short ret_type;
- char *name;
- int arg_index;
- };
-
- extern struct instr instrs[256];
-
-
-
-
-
-
-
- struct mem_block {
- char *block;
- int current_size;
- int max_size;
- };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- struct config {
- char *cf_name;
- int cf_type;
- union cf {
- char *cf_str;
- int cf_int;
- } u;
- };
-
- extern struct config configs[];
-
- int read_config_file(char *);
- void dump_config(void);
- void init_global_configs(void);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- struct case_heap_entry { int key; short addr; short line; };
-
-
- static struct mem_block mem_block[ 11 ];
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- static int exact_types;
- extern int pragma_strict_types;
- extern int pragma_save_types;
- int approved_object;
-
- extern int total_num_prog_blocks, total_prog_block_size;
-
- extern int num_parse_error;
- extern int d_flag;
- static int heart_beat;
-
- static int current_break_address;
- static int current_continue_address;
- static int current_case_number_heap;
- static int current_case_string_heap;
-
-
- static int zero_case_label;
- static int current_type;
-
- static int last_push_indexed;
- static int last_push_local;
- static int last_push_identifier;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- static int last_initializer_end;
- static int first_last_initializer_end;
-
- static struct program NULL_program;
-
- void epilog();
- static int check_declared (char *str) ;
- static void prolog();
- static char *get_two_types (int type1, int type2) ;
- void free_all_local_names(),
- add_local_name (char *, int) , smart_log (char *, int, char *) ;
- extern int yylex();
- extern char *findstring (char *) ;
- static int verify_declared (char *) ;
- static void copy_variables();
- static int copy_functions (struct program *, int type) ;
- void type_error (char *, int) ;
-
- char *xalloc(), *string_copy();
-
- extern int current_line;
-
-
-
-
-
- extern char *current_file, *inherit_file;
-
-
-
-
- char **local_names;
- unsigned short *type_of_locals;
- int current_number_of_locals = 0;
- int current_break_stack_need = 0 ,max_break_stack_need = 0;
-
-
-
-
-
-
-
-
- static struct mem_block type_of_arguments;
-
- struct program *prog;
-
- void init_compiler(void)
- {
- memset(&mem_block, 0, sizeof(struct mem_block) * 11 );
- memset(&type_of_arguments, 0, sizeof(type_of_arguments));
- }
-
-
-
-
- static int compatible_types(t1, t2)
- int t1, t2;
- {
- if (t1 == 0 || t2 == 0 )
- return 0;
- if (t1 == t2)
- return 1;
- if (t1 == 5 || t2 == 5 )
- return 1;
- if ((t1 & 0x0400 ) && (t2 & 0x0400 )) {
- if ((t1 & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == (5 |0x0400 ) ||
- (t2 & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == (5 |0x0400 ))
- return 1;
- }
- return 0;
- }
-
-
-
-
-
- static void add_arg_type(type)
- unsigned short type;
- {
- struct mem_block *mbp = &type_of_arguments;
- while (mbp->current_size + sizeof type > mbp->max_size) {
- mbp->max_size <<= 1;
- mbp->block = xrealloc((char *)mbp->block, mbp->max_size);
- }
- memcpy(mbp->block + mbp->current_size, &type, sizeof type);
- mbp->current_size += sizeof type;
- }
-
-
-
-
-
- static void pop_arg_stack(n)
- int n;
- {
- type_of_arguments.current_size -= sizeof (unsigned short) * n;
- }
-
-
-
-
-
-
-
- int get_argument_type(arg, n)
- int arg, n;
- {
- return
- ((unsigned short *)
- (type_of_arguments.block + type_of_arguments.current_size))[arg - n];
- }
-
-
- static void add_to_mem_block(n, data, size)
- int n, size;
- char *data;
- {
- struct mem_block *mbp = &mem_block[n];
- while (mbp->current_size + size > mbp->max_size) {
- mbp->max_size <<= 1;
- mbp->block = xrealloc((char *)mbp->block, mbp->max_size);
- }
- memcpy(mbp->block + mbp->current_size, data, size);
- mbp->current_size += size;
- }
-
- static void ins_byte(b)
- char b;
- {
- add_to_mem_block( 0 , &b, 1);
- }
-
-
-
-
-
-
- static void ins_short(l)
- short l;
- {
- add_to_mem_block( 0 , (char *)&l + 0, 1);
- add_to_mem_block( 0 , (char *)&l + 1, 1);
- }
-
- static void upd_short(offset, l)
- int offset;
- short l;
- {
- mem_block[ 0 ].block[offset + 0] = ((char *)&l)[0];
- mem_block[ 0 ].block[offset + 1] = ((char *)&l)[1];
- }
-
- static short read_short(offset)
- int offset;
- {
- short l;
-
- ((char *)&l)[0] = mem_block[ 0 ].block[offset + 0];
- ((char *)&l)[1] = mem_block[ 0 ].block[offset + 1];
- return l;
- }
-
-
-
-
-
- static void ins_long(l)
- int l;
- {
- add_to_mem_block( 0 , (char *)&l+0, 1);
- add_to_mem_block( 0 , (char *)&l+1, 1);
- add_to_mem_block( 0 , (char *)&l+2, 1);
- add_to_mem_block( 0 , (char *)&l+3, 1);
- }
-
- static void ins_f_byte(b)
- unsigned int b;
- {
- ins_byte((char)(b - 257 ));
- }
-
-
-
-
- static int defined_function(s, start)
- char *s;
- int start;
- {
- int offset;
- struct function *funp;
- char *interned;
-
- if (interned = findstring(s))
- for (offset = start * sizeof (struct function);
- offset < mem_block[ 1 ].current_size;
- offset += sizeof (struct function))
- {
- funp = (struct function *)&mem_block[ 1 ].block[offset];
- if (funp->flags & 0x8 )
- continue;
- if (funp->name == interned)
- return offset / sizeof (struct function);
- }
- return -1;
- }
-
-
-
-
-
- static int comp_stackp;
- int *comp_stack;
-
- static void push_address() {
- if (comp_stackp >= (configs[19].u.cf_int) ) {
- yyerror("Compiler stack overflow");
- comp_stackp++;
- return;
- }
- comp_stack[comp_stackp++] = mem_block[ 0 ].current_size;
- }
-
- static void push_explicit(address)
- int address;
- {
- if (comp_stackp >= (configs[19].u.cf_int) ) {
- yyerror("Compiler stack overflow");
- comp_stackp++;
- return;
- }
- comp_stack[comp_stackp++] = address;
- }
-
- static int pop_address() {
- if (comp_stackp == 0)
- fatal("Compiler stack underflow.\n");
- if (comp_stackp > (configs[19].u.cf_int) ) {
- --comp_stackp;
- return 0;
- }
- return comp_stack[--comp_stackp];
- }
-
-
-
-
-
-
-
-
-
-
- static void find_inherited(funp)
- struct function *funp;
- {
- int i;
- struct inherit *ip;
- int num_inherits, super_length;
- char *real_name, *super_name = 0, *p;
- char *interned;
-
- real_name = funp->name;
- if (real_name[0] == ':')
- real_name = real_name + 2;
- else if (p = strchr(real_name, ':')) {
- real_name = p+2;
- super_name = funp->name;
- super_length = real_name - super_name - 2;
- }
- num_inherits = mem_block[ 5 ].current_size /
- sizeof (struct inherit);
- ip = &((struct inherit *)mem_block[ 5 ].block)[num_inherits-1];
- if (interned = findstring(real_name))
- for (; num_inherits > 0; ip--, num_inherits--) {
- if (super_name) {
- int l = strlen(ip->prog->name);
- if (l - 2 < super_length)
- continue;
- if (strncmp(super_name, ip->prog->name + l - 2 - super_length,
- super_length) != 0)
- continue;
- }
- for (i=0; i < ip->prog->num_functions; i++) {
- if (ip->prog->functions[i].flags & ( 0x2 | 0x8 ))
- continue;
- if (ip->prog->functions[i].type & 0x0800 )
- continue;
- if (ip->prog->functions[i].name != interned)
- continue;
- funp->offset = ip - (struct inherit *)mem_block[ 5 ].block;
- funp->flags = ip->prog->functions[i].flags | 0x1 ;
- funp->num_local = ip->prog->functions[i].num_local;
- funp->num_arg = ip->prog->functions[i].num_arg;
- funp->type = ip->prog->functions[i].type;
- funp->type |= funp->type & 0x2000 ?
- ip->type & ~0x0800 : ip->type;
- funp->function_index_offset = i;
- return;
- }
- }
- return;
- }
-
- void replace_function(num, name, num_arg, num_local, offset, flags, type)
- int num, num_arg, num_local, offset, flags, type;
- char *name;
- {
- struct function *funp;
-
- funp = (struct function *)(mem_block[ 1 ].block) + num;
- if (!(funp->flags & 0x2 ) &&
- !(flags & 0x10 ) &&
- !(funp->flags & 0x1 ))
- {
- char buff[500];
- sprintf(buff, "Redeclaration of function %s.", name);
- yyerror(buff);
- return;
- }
-
-
-
-
-
-
-
-
-
-
-
- if ((funp->type & 0x0200 ) &&
- !(funp->flags & 0x10 ) &&
- !(flags & 0x10 ))
- {
- char *p = (char *)alloca(80 + strlen(name));
- sprintf(p, "Illegal to redefine 'nomask' function \"%s\"",name);
- yyerror(p);
- }
- if (exact_types && funp->type != 0 ) {
- int i;
- if (funp->num_arg != num_arg && !(funp->type & 0x4000 ))
- yyerror("Incorrect number of arguments.");
- else if (!(funp->flags & 0x4 ))
- yyerror("Called function not compiled with type testing.");
- else {
-
- for (i=0; i < num_arg; i++) {
- }
- }
- }
-
- if (flags & 0x10 )
- return;
- funp->num_arg = num_arg;
- funp->num_local = num_local;
- funp->flags = flags;
- funp->offset = offset;
- funp->function_index_offset = 0;
- funp->type = type;
- if (exact_types)
- funp->flags |= 0x4 ;
- return;
- }
-
-
-
-
-
-
-
- static int define_new_function(name, num_arg, num_local, offset, flags, type)
- char *name;
- int num_arg, num_local;
- int offset, flags, type;
- {
- int num;
- struct function fun;
- unsigned short argument_start_index;
-
- num = defined_function(name, 0);
- if (num >= 0) {
- int save_num;
-
-
-
-
-
-
-
-
-
-
- do {
- replace_function(num, name, num_arg, num_local, offset, flags,type);
- save_num = num;
- num = defined_function(name, num+1);
- } while (num >= 0);
- return save_num;
- }
- if (strcmp(name, "heart_beat") == 0)
- heart_beat = mem_block[ 1 ].current_size /
- sizeof (struct function);
- fun.name = make_shared_string(name);
- fun.offset = offset;
- fun.flags = flags;
- fun.num_arg = num_arg;
- fun.num_local = num_local;
- fun.function_index_offset = 0;
- fun.type = type;
- if (exact_types)
- fun.flags |= 0x4 ;
- num = mem_block[ 1 ].current_size / sizeof fun;
-
- add_to_mem_block( 1 , (char *)&fun, sizeof fun);
-
- if (exact_types == 0 || num_arg == 0) {
- argument_start_index = 65535 ;
- } else {
- int i;
-
-
-
-
- argument_start_index =
- mem_block[6 ].current_size /
- sizeof (unsigned short);
- for (i=0; i < num_arg; i++) {
- add_to_mem_block(6 , &type_of_locals[i],
- sizeof type_of_locals[i]);
- }
- }
- add_to_mem_block(7 , &argument_start_index,
- sizeof argument_start_index);
- return num;
- }
-
- static void define_variable(name, type, flags)
- char *name;
- int type;
- int flags;
- {
- struct variable dummy;
- int n;
-
- n = check_declared(name);
- if (n != -1 && (((struct variable *)mem_block[ 3 ].block + (n)) ->type & 0x0200 )) {
- char *p = (char *)alloca(80 + strlen(name));
- sprintf(p, "Illegal to redefine 'nomask' variable \"%s\"", name);
- yyerror(p);
- }
- dummy.name = make_shared_string(name);
- dummy.type = type;
- dummy.flags = flags;
- add_to_mem_block( 3 , (char *)&dummy, sizeof dummy);
- }
-
- short store_prog_string(str)
- char *str;
- {
- short i;
- char **p;
-
- p = (char **) mem_block[ 2 ].block;
- str = make_shared_string(str);
- for (i=mem_block[ 2 ].current_size / sizeof str -1; i>=0; --i)
- if (p[i] == str) {
- free_string(str);
- return i;
- }
-
- add_to_mem_block( 2 , &str, sizeof str);
- return mem_block[ 2 ].current_size / sizeof str - 1;
- }
-
- void add_to_case_heap(block_index,entry)
- int block_index;
- struct case_heap_entry *entry;
- {
- char *heap_start;
- int offset,parent;
- int current_heap;
-
- if ( block_index == 8 )
- current_heap = current_case_number_heap;
- else
- current_heap = current_case_string_heap;
- offset = mem_block[block_index].current_size - current_heap;
- add_to_mem_block(block_index, (char*)entry, sizeof(*entry) );
- heap_start = mem_block[block_index].block + current_heap;
- for ( ; offset; offset = parent ) {
- parent = ( offset - sizeof(struct case_heap_entry) ) >> 1 ;
- parent &= -sizeof(struct case_heap_entry) ;
- if ( ((struct case_heap_entry*)(heap_start+offset))->key <
- ((struct case_heap_entry*)(heap_start+parent))->key )
- {
- *(struct case_heap_entry*)(heap_start+offset) =
- *(struct case_heap_entry*)(heap_start+parent);
- *(struct case_heap_entry*)(heap_start+parent) = *entry;
- }
- }
- }
-
-
-
-
-
- static void transfer_init_control() {
- if (mem_block[ 0 ].current_size - 2 == last_initializer_end)
- mem_block[ 0 ].current_size -= 3;
- else {
-
-
-
-
- upd_short(last_initializer_end,
- mem_block[ 0 ].current_size);
- }
- }
-
- void add_new_init_jump();
-
- typedef union
- {
- int number;
- unsigned int address;
- char *string;
- short type;
- struct { int key; char block; } case_label;
- struct function *funp;
- } YYSTYPE;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- short yylhs[] = { -1,
- 0, 53, 53, 55, 55, 56, 51, 17, 17, 22,
- 22, 58, 59, 54, 54, 54, 61, 61, 14, 14,
- 23, 23, 19, 19, 19, 19, 19, 19, 20, 20,
- 15, 34, 21, 21, 16, 16, 16, 16, 16, 16,
- 16, 60, 60, 62, 63, 62, 57, 64, 64, 67,
- 66, 66, 65, 65, 65, 68, 68, 68, 68, 68,
- 68, 68, 68, 68, 68, 68, 68, 68, 77, 78,
- 70, 79, 71, 81, 82, 83, 84, 72, 80, 80,
- 85, 73, 74, 74, 30, 30, 2, 2, 4, 4,
- 5, 5, 6, 6, 6, 7, 7, 7, 7, 7,
- 8, 8, 8, 9, 9, 9, 10, 10, 10, 10,
- 11, 11, 12, 12, 12, 12, 75, 37, 86, 37,
- 52, 52, 52, 36, 87, 88, 36, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 76, 76,
- 3, 3, 3, 18, 18, 24, 24, 24, 25, 25,
- 40, 89, 40, 38, 90, 38, 39, 39, 41, 41,
- 42, 42, 44, 44, 44, 45, 45, 45, 45, 45,
- 43, 43, 43, 46, 46, 46, 47, 47, 47, 47,
- 35, 35, 48, 48, 48, 48, 48, 48, 49, 49,
- 49, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 94, 91, 92, 93, 13, 13, 32, 32, 32,
- 32, 33, 27, 26, 26, 95, 31, 96, 31, 28,
- 28, 28, 29, 29, 99, 69, 97, 98, 98,
- };
- short yylen[] = { 2,
- 1, 3, 0, 0, 1, 4, 1, 0, 1, 1,
- 1, 0, 0, 9, 3, 1, 3, 2, 0, 1,
- 1, 3, 1, 1, 1, 1, 1, 1, 0, 2,
- 2, 4, 1, 0, 1, 1, 1, 1, 1, 1,
- 1, 1, 3, 2, 0, 5, 4, 0, 4, 2,
- 1, 3, 0, 2, 2, 2, 1, 1, 1, 1,
- 1, 1, 1, 2, 1, 1, 2, 2, 0, 0,
- 7, 0, 8, 0, 0, 0, 0, 13, 0, 1,
- 0, 6, 3, 5, 1, 1, 1, 3, 1, 3,
- 1, 3, 1, 3, 3, 1, 3, 3, 3, 3,
- 1, 3, 3, 1, 3, 3, 1, 3, 3, 3,
- 1, 3, 1, 2, 2, 2, 2, 1, 0, 4,
- 1, 3, 3, 1, 0, 0, 7, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
- 0, 1, 2, 1, 3, 0, 1, 2, 3, 5,
- 1, 0, 4, 1, 0, 4, 1, 3, 1, 3,
- 1, 3, 1, 3, 3, 1, 3, 3, 3, 3,
- 1, 3, 3, 1, 3, 3, 1, 3, 3, 3,
- 1, 2, 1, 2, 2, 2, 2, 2, 1, 2,
- 2, 1, 1, 1, 1, 3, 1, 1, 1, 5,
- 5, 0, 5, 7, 9, 0, 3, 1, 1, 6,
- 4, 1, 1, 1, 3, 0, 5, 0, 7, 1,
- 2, 3, 1, 1, 0, 4, 4, 0, 2,
- };
- short yydefred[] = { 3,
- 0, 0, 24, 25, 23, 28, 26, 27, 0, 0,
- 0, 0, 16, 9, 0, 0, 0, 30, 35, 36,
- 37, 0, 38, 39, 40, 41, 33, 31, 5, 2,
- 0, 15, 0, 0, 0, 0, 0, 43, 6, 0,
- 0, 0, 0, 0, 0, 0, 21, 0, 0, 212,
- 0, 0, 7, 0, 0, 0, 0, 202, 0, 0,
- 0, 0, 216, 0, 192, 0, 194, 0, 177, 121,
- 0, 0, 0, 0, 0, 0, 161, 163, 0, 0,
- 181, 183, 0, 195, 46, 197, 198, 199, 13, 18,
- 0, 0, 134, 135, 138, 136, 137, 129, 130, 131,
- 132, 133, 128, 0, 0, 0, 0, 0, 0, 0,
- 224, 223, 221, 0, 0, 186, 0, 0, 0, 0,
- 118, 188, 187, 0, 0, 190, 191, 0, 182, 152,
- 155, 0, 125, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 17, 22, 123, 0, 0, 0, 0, 0, 144,
- 0, 0, 0, 0, 196, 0, 0, 222, 122, 0,
- 0, 0, 0, 0, 162, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 178, 179, 180, 218, 0,
- 11, 48, 14, 10, 0, 0, 0, 0, 0, 0,
- 0, 0, 32, 0, 0, 153, 156, 126, 0, 0,
- 211, 0, 0, 0, 203, 200, 145, 201, 0, 149,
- 120, 217, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 66, 0, 0, 65, 0, 0,
- 57, 58, 59, 60, 61, 62, 63, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 210, 55, 0,
- 0, 67, 74, 0, 68, 214, 113, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 107,
- 111, 0, 86, 0, 117, 0, 0, 0, 56, 47,
- 54, 64, 0, 0, 225, 0, 204, 0, 150, 127,
- 219, 0, 0, 0, 115, 0, 114, 116, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 83, 50, 49, 0,
- 0, 0, 0, 207, 0, 227, 0, 0, 81, 112,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 108, 109, 110, 215, 0, 52, 0,
- 0, 0, 226, 205, 75, 0, 84, 70, 0, 229,
- 0, 82, 0, 0, 0, 71, 0, 76, 73, 0,
- 0, 77, 0, 78,
- };
- short yydgoto[] = { 1,
- 104, 272, 158, 273, 274, 275, 276, 277, 278, 279,
- 280, 281, 253, 43, 44, 27, 286, 159, 10, 45,
- 28, 193, 46, 161, 162, 282, 283, 63, 64, 284,
- 65, 66, 67, 68, 69, 70, 237, 71, 72, 73,
- 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
- 84, 121, 2, 12, 30, 13, 238, 35, 151, 16,
- 47, 17, 36, 212, 239, 287, 288, 240, 241, 242,
- 243, 244, 245, 246, 247, 248, 249, 373, 250, 338,
- 303, 371, 380, 383, 366, 166, 173, 223, 170, 171,
- 86, 87, 88, 114, 124, 209, 251, 363, 333,
- };
- short yysindex[] = { 0,
- 0, -140, 0, 0, 0, 0, 0, 0, 20, -140,
- 1306, 30, 0, 0, -172, 54, 79, 0, 0, 0,
- 0, -143, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 20, 85, 119, 90, -118, 0, 0, -140,
- 1376, 0, 131, -26, 699, 156, 0, 1613, 0, 0,
- 394, 394, 0, 172, 185, 0, -232, 0, 1556, 1491,
- 1556, 1556, 0, -111, 0, 1601, 0, 1556, 0, 0,
- -43, -89, 171, 144, 205, 206, 0, 0, 50, 239,
- 0, 0, -73, 0, 0, 0, 0, 0, 0, 0,
- -18, -140, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1568, 1503, 0, -73, 0, 1376, 1376,
- 0, 0, 0, 223, -99, 0, 1376, 1376, 20, 228,
- 0, 0, 0, 273, -232, 0, 0, 1376, 0, 0,
- 0, 1568, 0, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
- 1568, 1568, 1568, 1568, 1568, 1556, 1556, 1556, -219, 1376,
- -11, 0, 0, 0, 246, 263, 1376, 203, 291, 0,
- 244, 302, 290, 309, 0, 315, 1376, 0, 0, 1568,
- 1568, 144, 1568, 205, 0, -79, -79, -79, -79, 50,
- 50, -79, -79, 239, 239, 0, 0, 0, 0, -84,
- 0, 0, 0, 0, 1376, 1376, 321, 325, 1376, 331,
- 1376, 1568, 0, 1376, 333, 0, 0, 0, 347, 1376,
- 0, 1056, 354, 355, 0, 0, 0, 0, 342, 0,
- 0, 0, 349, 1376, 316, 1562, 370, 1376, 365, 373,
- 385, 367, 62, 369, 0, 20, 372, 0, 304, 1153,
- 0, 0, 0, 0, 0, 0, 0, 376, 130, 132,
- 1171, 394, 398, 1376, 1568, 1568, 399, 0, 0, 1376,
- 0, 0, 0, 1376, 0, 0, 0, 164, 5, 165,
- 173, 341, 361, 411, -186, -29, -78, 232, 386, 0,
- 0, 414, 0, -56, 0, 197, 412, 426, 0, 0,
- 0, 0, 432, 1171, 0, 354, 0, 354, 0, 0,
- 0, 433, 1376, 434, 0, -5, 0, 0, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 196, 62, 0, 0, 0, 20,
- 1376, 175, 168, 0, 443, 0, 0, 429, 0, 0,
- 361, 411, -186, -29, -29, -78, -78, -78, -78, 232,
- 232, 386, 386, 0, 0, 0, 0, 431, 0, 450,
- 452, 1171, 0, 0, 0, 1171, 0, 0, 1376, 0,
- 1376, 0, 1171, 454, 437, 0, 444, 0, 0, 1376,
- 461, 0, 1171, 0,
- };
- short yyrindex[] = { 0,
- 0, 1244, 0, 0, 0, 0, 0, 0, 237, 1386,
- -28, 1233, 0, 0, 0, 0, 451, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 31, 0, 237, 0, 0, 0, 0, 0, 0, 1482,
- 0, 94, 0, 237, -27, 471, 0, 0, -37, 0,
- 0, 0, 0, 0, 0, 23, 0, 0, 0, 0,
- 0, 0, 0, 478, 0, 83, 0, 0, 0, 0,
- 621, 463, 174, 1222, 1125, 729, 0, 0, 511, 400,
- 0, 0, 326, 0, 0, 0, 0, 0, 0, 0,
- 0, 1395, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 123, 0, 267, 0, 0,
- 0, 0, 0, 0, 83, 0, 395, 430, 486, 475,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, -7, 0,
- 0, 438, 0, 0, 0, 0, 493, 0, 0, 0,
- 0, 1224, 0, 1145, 0, 807, 847, 870, 984, 565,
- 588, 1032, 1048, 423, 470, 0, 0, 0, 0, 475,
- 0, 0, 0, 0, 0, 0, 475, 0, -3, 0,
- 445, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -93, 495, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 493, 475, 0, 0, 480, 0, 0,
- 0, 0, 0, 0, 0, 237, 475, 0, 0, -93,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- -4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 15, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -46, -30, 146, 38, 11, -21, 720, 662, 0,
- 0, -45, 0, 0, 0, 0, 0, 483, 0, 0,
- 0, 0, 0, -4, 0, 17, 0, 495, 0, 0,
- 0, 475, 484, 475, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 237,
- 0, 0, 1100, 0, 0, 0, 180, 0, 0, 0,
- -14, 155, 99, 98, 779, 39, 111, 907, 959, 769,
- 774, 687, 695, 0, 0, 0, 0, 0, 0, 475,
- 0, -4, 0, 0, 0, -4, 0, 0, 0, 0,
- 484, 0, -4, 475, 0, 0, 0, 0, 0, 503,
- 0, 0, -4, 0,
- };
- short yygindex[] = { 0,
- 479, 277, -95, 242, 243, 247, 67, -88, 63, -101,
- -133, 0, 45, 0, 552, -17, 166, 0, 0, 148,
- 0, 0, 0, 0, 0, 0, 0, 408, -10, 241,
- 0, 1897, 0, 0, 0, -62, 1375, 397, 0, -151,
- 440, 441, 501, 442, 0, 183, 250, 521, 0, -22,
- 0, 1796, 0, 0, 0, 0, 425, 0, 0, 546,
- 489, 0, 0, 0, 344, 255, 0, 114, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, -325,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,
- };
-
- short yytable[] = { 208,
- 208, 327, 224, 208, 208, 208, 208, 208, 211, 208,
- 87, 85, 213, 34, 34, 14, 96, 150, 206, 96,
- 208, 208, 208, 208, 208, 208, 88, 87, 107, 107,
- 317, 53, 316, 142, 132, 340, 96, 143, 96, 111,
- 96, 154, 119, 88, 269, 375, 113, 191, 93, 270,
- 220, 93, 111, 208, 381, 208, 208, 206, 119, 209,
- 209, 14, 223, 209, 209, 209, 209, 209, 93, 209,
- 12, 205, 96, 140, 44, 91, 98, 112, 91, 98,
- 209, 209, 209, 209, 209, 209, 208, 208, 29, 44,
- 112, 45, 144, 87, 145, 91, 98, 57, 98, 31,
- 98, 269, 96, 299, 93, 312, 270, 193, 313, 88,
- 208, 192, 32, 209, 168, 209, 209, 142, 309, 193,
- 193, 143, 33, 193, 193, 193, 193, 193, 257, 193,
- 271, 91, 98, 34, 93, 94, 92, 44, 94, 92,
- 193, 193, 193, 39, 193, 193, 209, 209, 100, 11,
- 41, 100, 44, 42, 45, 94, 92, 18, 40, 184,
- 184, 91, 98, 184, 184, 184, 184, 184, 100, 184,
- 100, 89, 100, 193, 15, 193, 193, 3, 126, 127,
- 184, 184, 184, 131, 184, 184, 89, 271, 354, 355,
- 356, 94, 92, 300, 236, 90, 4, 5, 37, 92,
- 6, 7, 8, 89, 100, 125, 193, 193, 69, 91,
- 72, 109, 90, 193, 124, 184, 184, 124, 352, 353,
- 80, 94, 92, 119, 110, 346, 347, 348, 349, 107,
- 130, 124, 124, 133, 100, 208, 208, 134, 80, 89,
- 208, 208, 135, 34, 34, 149, 184, 184, 90, 140,
- 318, 141, 319, 152, 208, 208, 208, 208, 208, 208,
- 208, 208, 157, 314, 315, 143, 124, 142, 165, 89,
- 96, 96, 96, 96, 320, 147, 321, 208, 90, 224,
- 146, 208, 34, 90, 164, 148, 208, 267, 208, 195,
- 208, 208, 208, 208, 208, 209, 209, 69, 124, 72,
- 209, 209, 93, 185, 185, 93, 196, 185, 185, 185,
- 185, 185, 167, 185, 209, 209, 209, 209, 209, 209,
- 209, 209, 180, 181, 185, 185, 185, 198, 185, 185,
- 98, 98, 98, 98, 199, 193, 200, 209, 266, 223,
- 334, 209, 335, 268, 267, 201, 209, 202, 209, 203,
- 209, 209, 209, 209, 209, 193, 193, 193, 204, 185,
- 185, 215, 189, 189, 295, 216, 189, 189, 189, 189,
- 189, 218, 189, 222, 193, 193, 193, 193, 344, 345,
- 350, 351, 210, 189, 189, 189, 224, 189, 189, 94,
- 185, 185, 94, 184, 185, 184, 184, 252, 254, 255,
- 268, 193, 100, 100, 100, 100, 256, 332, 258, 260,
- 326, 193, 263, 193, 184, 184, 184, 184, 189, 189,
- 85, 213, 323, 262, 264, 265, 285, 322, 290, 208,
- 289, 293, 324, 105, 292, 294, 87, 174, 297, 301,
- 174, 193, 174, 174, 174, 96, 305, 307, 311, 189,
- 189, 184, 88, 184, 310, 308, 325, 174, 174, 174,
- 175, 174, 174, 175, 309, 175, 175, 175, 328, 330,
- 329, 331, 357, 336, 339, 370, 361, 93, 362, 372,
- 175, 175, 175, 364, 175, 175, 376, 365, 367, 209,
- 368, 369, 174, 174, 377, 378, 384, 136, 137, 138,
- 139, 382, 379, 154, 91, 98, 154, 176, 8, 42,
- 176, 20, 176, 176, 176, 175, 175, 220, 119, 141,
- 154, 154, 146, 174, 174, 154, 8, 176, 176, 176,
- 147, 176, 176, 141, 140, 206, 141, 148, 139, 185,
- 185, 51, 79, 79, 128, 306, 175, 175, 171, 193,
- 341, 171, 342, 9, 171, 154, 189, 343, 185, 185,
- 185, 185, 176, 176, 94, 92, 358, 207, 171, 171,
- 171, 172, 171, 171, 174, 194, 175, 100, 38, 116,
- 153, 122, 123, 291, 359, 193, 0, 154, 129, 184,
- 0, 0, 0, 176, 176, 185, 0, 185, 189, 189,
- 0, 0, 172, 171, 171, 172, 0, 0, 172, 0,
- 0, 0, 89, 0, 0, 0, 0, 189, 189, 189,
- 189, 90, 172, 172, 172, 173, 172, 172, 173, 0,
- 0, 173, 0, 0, 171, 171, 176, 177, 178, 179,
- 124, 0, 182, 183, 0, 173, 173, 173, 0, 173,
- 173, 0, 0, 0, 189, 0, 189, 172, 172, 0,
- 0, 151, 0, 0, 151, 49, 186, 187, 188, 0,
- 50, 0, 174, 174, 0, 0, 53, 0, 151, 151,
- 173, 173, 0, 151, 0, 0, 0, 0, 172, 172,
- 0, 174, 174, 174, 174, 175, 175, 0, 0, 104,
- 54, 55, 104, 56, 104, 0, 104, 0, 0, 0,
- 57, 173, 173, 151, 175, 175, 175, 175, 0, 104,
- 0, 104, 0, 104, 105, 0, 58, 105, 174, 105,
- 174, 105, 106, 185, 0, 106, 154, 106, 0, 106,
- 0, 0, 176, 176, 105, 151, 105, 0, 105, 0,
- 0, 175, 106, 175, 106, 104, 106, 101, 0, 0,
- 101, 176, 176, 176, 176, 0, 166, 0, 0, 166,
- 0, 0, 166, 0, 0, 0, 0, 101, 0, 101,
- 105, 101, 0, 171, 171, 104, 166, 166, 106, 0,
- 0, 166, 189, 0, 0, 0, 0, 0, 176, 0,
- 176, 0, 171, 171, 171, 171, 102, 0, 0, 102,
- 105, 103, 0, 101, 103, 0, 95, 0, 106, 95,
- 0, 166, 166, 0, 0, 0, 102, 0, 102, 0,
- 102, 103, 0, 103, 0, 103, 95, 172, 172, 171,
- 0, 171, 0, 101, 164, 0, 0, 164, 0, 0,
- 164, 0, 166, 166, 0, 0, 172, 172, 172, 172,
- 173, 173, 102, 0, 164, 164, 174, 103, 0, 164,
- 0, 0, 95, 0, 0, 0, 0, 0, 0, 173,
- 173, 173, 173, 0, 168, 0, 0, 168, 0, 175,
- 168, 0, 102, 172, 0, 172, 0, 103, 0, 164,
- 164, 0, 95, 0, 168, 168, 0, 170, 0, 168,
- 170, 0, 0, 170, 0, 0, 173, 0, 173, 0,
- 0, 0, 0, 0, 0, 0, 0, 170, 170, 154,
- 164, 164, 170, 0, 0, 0, 176, 0, 0, 168,
- 168, 0, 0, 0, 97, 0, 0, 97, 0, 0,
- 0, 0, 0, 104, 104, 104, 104, 0, 0, 0,
- 0, 0, 170, 170, 97, 0, 97, 0, 97, 0,
- 168, 168, 0, 19, 0, 0, 0, 171, 105, 105,
- 105, 105, 0, 20, 0, 0, 106, 106, 106, 106,
- 104, 0, 104, 170, 170, 0, 99, 0, 0, 99,
- 97, 166, 166, 0, 0, 0, 0, 21, 0, 0,
- 0, 101, 101, 101, 101, 105, 99, 105, 99, 0,
- 99, 165, 0, 106, 165, 106, 0, 165, 0, 0,
- 97, 172, 23, 24, 25, 0, 0, 0, 26, 0,
- 0, 165, 165, 0, 0, 0, 165, 0, 101, 0,
- 101, 0, 99, 0, 173, 0, 0, 0, 0, 0,
- 102, 102, 102, 102, 0, 103, 103, 103, 103, 167,
- 95, 0, 167, 95, 0, 167, 165, 165, 0, 164,
- 164, 0, 99, 0, 0, 169, 0, 151, 169, 167,
- 167, 169, 0, 0, 167, 60, 0, 102, 0, 102,
- 61, 0, 103, 0, 103, 169, 169, 165, 165, 0,
- 169, 0, 0, 0, 235, 0, 0, 0, 0, 168,
- 168, 0, 0, 0, 167, 167, 0, 0, 104, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 228,
- 169, 169, 170, 170, 228, 0, 0, 0, 0, 0,
- 0, 0, 0, 105, 0, 167, 167, 0, 228, 0,
- 0, 106, 0, 0, 0, 159, 0, 0, 159, 0,
- 0, 169, 169, 0, 0, 0, 0, 0, 192, 0,
- 0, 62, 159, 159, 0, 160, 101, 159, 160, 0,
- 0, 0, 60, 0, 0, 166, 0, 61, 97, 97,
- 97, 97, 160, 160, 0, 0, 0, 160, 0, 0,
- 60, 235, 0, 0, 0, 61, 0, 159, 159, 0,
- 0, 0, 228, 0, 228, 228, 0, 0, 0, 235,
- 0, 0, 4, 0, 0, 102, 0, 160, 160, 0,
- 103, 0, 0, 1, 0, 95, 0, 0, 159, 159,
- 99, 99, 99, 99, 0, 0, 165, 165, 0, 0,
- 0, 0, 157, 0, 158, 157, 0, 158, 160, 160,
- 0, 0, 0, 164, 4, 192, 0, 0, 62, 157,
- 157, 158, 158, 0, 157, 29, 158, 0, 0, 0,
- 0, 0, 0, 192, 0, 0, 62, 0, 0, 0,
- 0, 0, 0, 0, 167, 167, 0, 0, 0, 0,
- 0, 226, 0, 168, 157, 0, 158, 0, 0, 0,
- 169, 169, 0, 0, 0, 0, 227, 49, 0, 0,
- 19, 228, 50, 51, 52, 0, 170, 0, 53, 0,
- 20, 0, 0, 0, 0, 157, 157, 158, 158, 0,
- 0, 0, 0, 0, 0, 228, 0, 0, 229, 0,
- 230, 231, 54, 55, 21, 56, 0, 0, 232, 0,
- 228, 228, 57, 97, 0, 228, 228, 228, 228, 0,
- 0, 0, 228, 0, 0, 0, 0, 0, 58, 23,
- 24, 25, 0, 0, 59, 26, 0, 159, 159, 0,
- 0, 228, 228, 228, 228, 228, 228, 228, 226, 228,
- 0, 0, 228, 0, 0, 60, 228, 160, 160, 0,
- 61, 0, 0, 227, 49, 99, 48, 29, 228, 50,
- 51, 52, 228, 0, 120, 53, 29, 0, 228, 0,
- 0, 227, 49, 0, 0, 0, 228, 50, 51, 52,
- 165, 0, 0, 53, 0, 229, 0, 230, 231, 54,
- 55, 0, 56, 0, 0, 232, 0, 0, 0, 57,
- 0, 0, 0, 229, 0, 230, 231, 54, 55, 120,
- 56, 0, 0, 232, 0, 58, 0, 57, 0, 0,
- 0, 59, 0, 0, 157, 157, 158, 158, 167, 0,
- 0, 62, 0, 58, 4, 0, 0, 4, 0, 59,
- 0, 0, 0, 0, 169, 29, 0, 4, 29, 0,
- 233, 234, 19, 29, 190, 0, 0, 0, 29, 0,
- 60, 197, 0, 0, 0, 61, 0, 0, 0, 0,
- 0, 4, 60, 0, 0, 0, 0, 61, 4, 0,
- 4, 0, 29, 0, 0, 0, 0, 0, 0, 29,
- 0, 0, 0, 0, 228, 228, 4, 4, 4, 4,
- 4, 0, 4, 4, 4, 4, 0, 29, 29, 29,
- 19, 118, 0, 29, 225, 0, 0, 0, 0, 0,
- 20, 159, 0, 118, 0, 105, 0, 0, 0, 0,
- 61, 0, 261, 0, 0, 0, 0, 60, 0, 0,
- 0, 160, 61, 117, 21, 0, 62, 233, 234, 0,
- 259, 22, 103, 0, 0, 117, 0, 0, 62, 0,
- 0, 48, 0, 0, 302, 233, 234, 0, 304, 23,
- 24, 25, 0, 0, 0, 26, 0, 49, 0, 0,
- 0, 0, 50, 51, 52, 0, 0, 29, 53, 0,
- 29, 103, 0, 0, 0, 0, 29, 0, 0, 29,
- 29, 0, 0, 103, 0, 0, 0, 337, 0, 29,
- 0, 62, 54, 55, 0, 56, 0, 0, 157, 0,
- 158, 0, 57, 62, 29, 29, 0, 0, 0, 0,
- 0, 29, 0, 29, 29, 360, 0, 0, 58, 0,
- 0, 0, 0, 0, 59, 0, 0, 0, 0, 29,
- 29, 29, 0, 0, 0, 29, 0, 0, 29, 29,
- 29, 0, 0, 0, 29, 0, 0, 0, 0, 0,
- 0, 0, 0, 374, 0, 337, 48, 0, 0, 0,
- 0, 0, 0, 29, 337, 0, 29, 0, 48, 0,
- 0, 0, 49, 0, 0, 19, 29, 50, 51, 52,
- 0, 0, 0, 53, 49, 20, 0, 0, 0, 50,
- 51, 52, 0, 0, 0, 53, 0, 0, 0, 0,
- 29, 29, 0, 0, 0, 0, 0, 54, 55, 21,
- 56, 0, 0, 0, 0, 0, 0, 57, 0, 54,
- 55, 0, 56, 0, 0, 29, 29, 29, 0, 57,
- 0, 29, 0, 58, 23, 24, 25, 49, 0, 59,
- 26, 0, 50, 51, 52, 58, 85, 0, 53, 49,
- 0, 59, 0, 0, 50, 51, 52, 0, 0, 0,
- 53, 0, 0, 0, 0, 0, 0, 93, 94, 95,
- 96, 0, 54, 55, 0, 56, 0, 0, 0, 0,
- 0, 0, 57, 0, 54, 55, 97, 56, 126, 127,
- 0, 0, 0, 0, 57, 98, 0, 99, 58, 100,
- 0, 101, 0, 102, 59, 0, 93, 94, 95, 96,
- 58, 0, 0, 0, 155, 156, 59, 0, 93, 94,
- 95, 96, 160, 163, 0, 97, 0, 0, 0, 0,
- 0, 0, 0, 169, 98, 0, 99, 97, 100, 0,
- 101, 0, 102, 0, 0, 0, 98, 0, 99, 0,
- 100, 0, 101, 0, 102, 0, 0, 106, 108, 0,
- 0, 0, 0, 0, 0, 115, 0, 115, 115, 0,
- 0, 0, 160, 0, 115, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 213, 214, 0, 0, 217, 0, 219, 0, 0, 221,
- 115, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 160,
- 0, 0, 0, 0, 0, 0, 0, 0, 115, 0,
- 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
- 115, 115, 115, 115, 115, 0, 0, 0, 0, 298,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 115, 115, 0, 115,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 115, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 296, 0,
- 0, 115, 115,
- };
- short yycheck[] = { 37,
- 38, 58, 40, 41, 42, 43, 44, 45, 93, 47,
- 41, 58, 58, 42, 42, 42, 38, 91, 170, 41,
- 58, 59, 60, 61, 62, 63, 41, 58, 51, 52,
- 60, 125, 62, 41, 124, 41, 58, 41, 60, 272,
- 62, 104, 60, 58, 40, 371, 57, 59, 38, 45,
- 202, 41, 272, 91, 380, 93, 94, 41, 44, 37,
- 38, 42, 40, 41, 42, 43, 44, 45, 58, 47,
- 40, 167, 94, 59, 44, 38, 38, 310, 41, 41,
- 58, 59, 60, 61, 62, 63, 124, 125, 59, 59,
- 310, 61, 43, 124, 45, 58, 58, 317, 60, 272,
- 62, 40, 124, 255, 94, 292, 45, 91, 295, 124,
- 173, 123, 59, 91, 125, 93, 94, 125, 124, 37,
- 38, 125, 44, 41, 42, 43, 44, 45, 224, 47,
- 126, 94, 94, 277, 124, 38, 38, 44, 41, 41,
- 58, 59, 60, 59, 62, 63, 124, 125, 38, 2,
- 61, 41, 59, 272, 61, 58, 58, 10, 40, 37,
- 38, 124, 124, 41, 42, 43, 44, 45, 58, 47,
- 60, 41, 62, 91, 9, 93, 94, 318, 278, 279,
- 58, 59, 60, 273, 62, 63, 41, 126, 322, 323,
- 324, 94, 94, 256, 212, 41, 337, 338, 33, 44,
- 341, 342, 343, 58, 94, 317, 124, 125, 302, 44,
- 304, 40, 58, 91, 41, 93, 94, 44, 320, 321,
- 41, 124, 124, 44, 40, 314, 315, 316, 317, 252,
- 274, 58, 59, 63, 124, 273, 274, 94, 59, 94,
- 278, 279, 38, 272, 272, 319, 124, 125, 94, 329,
- 329, 331, 331, 272, 292, 293, 294, 295, 296, 297,
- 298, 299, 40, 293, 294, 60, 93, 62, 41, 124,
- 292, 293, 294, 295, 43, 37, 45, 315, 124, 317,
- 42, 319, 310, 310, 119, 47, 324, 283, 326, 44,
- 328, 329, 330, 331, 332, 273, 274, 302, 125, 304,
- 278, 279, 292, 37, 38, 295, 44, 41, 42, 43,
- 44, 45, 40, 47, 292, 293, 294, 295, 296, 297,
- 298, 299, 140, 141, 58, 59, 60, 125, 62, 63,
- 292, 293, 294, 295, 44, 319, 93, 315, 277, 317,
- 296, 319, 298, 339, 283, 44, 324, 58, 326, 41,
- 328, 329, 330, 331, 332, 273, 274, 91, 44, 93,
- 94, 41, 37, 38, 251, 41, 41, 42, 43, 44,
- 45, 41, 47, 41, 292, 293, 294, 295, 312, 313,
- 318, 319, 467, 58, 59, 60, 40, 62, 63, 292,
- 124, 125, 295, 144, 145, 273, 274, 44, 44, 58,
- 339, 319, 292, 293, 294, 295, 58, 294, 93, 40,
- 467, 329, 40, 331, 292, 293, 294, 295, 93, 94,
- 467, 467, 37, 59, 40, 59, 58, 42, 125, 467,
- 59, 302, 47, 40, 59, 304, 467, 38, 41, 41,
- 41, 319, 43, 44, 45, 467, 283, 283, 38, 124,
- 125, 329, 467, 331, 94, 283, 43, 58, 59, 60,
- 38, 62, 63, 41, 124, 43, 44, 45, 272, 44,
- 59, 40, 277, 41, 41, 362, 302, 467, 311, 366,
- 58, 59, 60, 41, 62, 63, 373, 59, 58, 467,
- 41, 40, 93, 94, 41, 59, 383, 292, 293, 294,
- 295, 41, 59, 41, 467, 467, 44, 38, 272, 59,
- 41, 41, 43, 44, 45, 93, 94, 40, 44, 125,
- 58, 59, 93, 124, 125, 63, 41, 58, 59, 60,
- 93, 62, 63, 41, 329, 41, 331, 93, 59, 273,
- 274, 59, 59, 41, 66, 269, 124, 125, 38, 467,
- 309, 41, 310, 2, 44, 93, 149, 311, 292, 293,
- 294, 295, 93, 94, 467, 467, 326, 171, 58, 59,
- 60, 132, 62, 63, 134, 151, 135, 467, 33, 59,
- 92, 61, 62, 240, 330, 319, -1, 125, 68, 467,
- -1, -1, -1, 124, 125, 329, -1, 331, 273, 274,
- -1, -1, 38, 93, 94, 41, -1, -1, 44, -1,
- -1, -1, 467, -1, -1, -1, -1, 292, 293, 294,
- 295, 467, 58, 59, 60, 38, 62, 63, 41, -1,
- -1, 44, -1, -1, 124, 125, 136, 137, 138, 139,
- 467, -1, 142, 143, -1, 58, 59, 60, -1, 62,
- 63, -1, -1, -1, 329, -1, 331, 93, 94, -1,
- -1, 41, -1, -1, 44, 272, 146, 147, 148, -1,
- 277, -1, 273, 274, -1, -1, 283, -1, 58, 59,
- 93, 94, -1, 63, -1, -1, -1, -1, 124, 125,
- -1, 292, 293, 294, 295, 273, 274, -1, -1, 38,
- 307, 308, 41, 310, 43, -1, 45, -1, -1, -1,
- 317, 124, 125, 93, 292, 293, 294, 295, -1, 58,
- -1, 60, -1, 62, 38, -1, 333, 41, 329, 43,
- 331, 45, 38, 467, -1, 41, 274, 43, -1, 45,
- -1, -1, 273, 274, 58, 125, 60, -1, 62, -1,
- -1, 329, 58, 331, 60, 94, 62, 38, -1, -1,
- 41, 292, 293, 294, 295, -1, 38, -1, -1, 41,
- -1, -1, 44, -1, -1, -1, -1, 58, -1, 60,
- 94, 62, -1, 273, 274, 124, 58, 59, 94, -1,
- -1, 63, 467, -1, -1, -1, -1, -1, 329, -1,
- 331, -1, 292, 293, 294, 295, 38, -1, -1, 41,
- 124, 38, -1, 94, 41, -1, 38, -1, 124, 41,
- -1, 93, 94, -1, -1, -1, 58, -1, 60, -1,
- 62, 58, -1, 60, -1, 62, 58, 273, 274, 329,
- -1, 331, -1, 124, 38, -1, -1, 41, -1, -1,
- 44, -1, 124, 125, -1, -1, 292, 293, 294, 295,
- 273, 274, 94, -1, 58, 59, 467, 94, -1, 63,
- -1, -1, 94, -1, -1, -1, -1, -1, -1, 292,
- 293, 294, 295, -1, 38, -1, -1, 41, -1, 467,
- 44, -1, 124, 329, -1, 331, -1, 124, -1, 93,
- 94, -1, 124, -1, 58, 59, -1, 38, -1, 63,
- 41, -1, -1, 44, -1, -1, 329, -1, 331, -1,
- -1, -1, -1, -1, -1, -1, -1, 58, 59, 467,
- 124, 125, 63, -1, -1, -1, 467, -1, -1, 93,
- 94, -1, -1, -1, 38, -1, -1, 41, -1, -1,
- -1, -1, -1, 292, 293, 294, 295, -1, -1, -1,
- -1, -1, 93, 94, 58, -1, 60, -1, 62, -1,
- 124, 125, -1, 275, -1, -1, -1, 467, 292, 293,
- 294, 295, -1, 285, -1, -1, 292, 293, 294, 295,
- 329, -1, 331, 124, 125, -1, 38, -1, -1, 41,
- 94, 273, 274, -1, -1, -1, -1, 309, -1, -1,
- -1, 292, 293, 294, 295, 329, 58, 331, 60, -1,
- 62, 38, -1, 329, 41, 331, -1, 44, -1, -1,
- 124, 467, 334, 335, 336, -1, -1, -1, 340, -1,
- -1, 58, 59, -1, -1, -1, 63, -1, 329, -1,
- 331, -1, 94, -1, 467, -1, -1, -1, -1, -1,
- 292, 293, 294, 295, -1, 292, 293, 294, 295, 38,
- 292, -1, 41, 295, -1, 44, 93, 94, -1, 273,
- 274, -1, 124, -1, -1, 38, -1, 467, 41, 58,
- 59, 44, -1, -1, 63, 40, -1, 329, -1, 331,
- 45, -1, 329, -1, 331, 58, 59, 124, 125, -1,
- 63, -1, -1, -1, 59, -1, -1, -1, -1, 273,
- 274, -1, -1, -1, 93, 94, -1, -1, 467, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 40,
- 93, 94, 273, 274, 45, -1, -1, -1, -1, -1,
- -1, -1, -1, 467, -1, 124, 125, -1, 59, -1,
- -1, 467, -1, -1, -1, 41, -1, -1, 44, -1,
- -1, 124, 125, -1, -1, -1, -1, -1, 123, -1,
- -1, 126, 58, 59, -1, 41, 467, 63, 44, -1,
- -1, -1, 40, -1, -1, 467, -1, 45, 292, 293,
- 294, 295, 58, 59, -1, -1, -1, 63, -1, -1,
- 40, 59, -1, -1, -1, 45, -1, 93, 94, -1,
- -1, -1, 123, -1, 125, 126, -1, -1, -1, 59,
- -1, -1, 0, -1, -1, 467, -1, 93, 94, -1,
- 467, -1, -1, 0, -1, 467, -1, -1, 124, 125,
- 292, 293, 294, 295, -1, -1, 273, 274, -1, -1,
- -1, -1, 41, -1, 41, 44, -1, 44, 124, 125,
- -1, -1, -1, 467, 42, 123, -1, -1, 126, 58,
- 59, 58, 59, -1, 63, 42, 63, -1, -1, -1,
- -1, -1, -1, 123, -1, -1, 126, -1, -1, -1,
- -1, -1, -1, -1, 273, 274, -1, -1, -1, -1,
- -1, 256, -1, 467, 93, -1, 93, -1, -1, -1,
- 273, 274, -1, -1, -1, -1, 271, 272, -1, -1,
- 275, 276, 277, 278, 279, -1, 467, -1, 283, -1,
- 285, -1, -1, -1, -1, 124, 125, 124, 125, -1,
- -1, -1, -1, -1, -1, 256, -1, -1, 303, -1,
- 305, 306, 307, 308, 309, 310, -1, -1, 313, -1,
- 271, 272, 317, 467, -1, 276, 277, 278, 279, -1,
- -1, -1, 283, -1, -1, -1, -1, -1, 333, 334,
- 335, 336, -1, -1, 339, 340, -1, 273, 274, -1,
- -1, 302, 303, 304, 305, 306, 307, 308, 256, 310,
- -1, -1, 313, -1, -1, 40, 317, 273, 274, -1,
- 45, -1, -1, 271, 272, 467, 256, 42, 276, 277,
- 278, 279, 333, -1, 60, 283, 42, -1, 339, -1,
- -1, 271, 272, -1, -1, -1, 276, 277, 278, 279,
- 467, -1, -1, 283, -1, 303, -1, 305, 306, 307,
- 308, -1, 310, -1, -1, 313, -1, -1, -1, 317,
- -1, -1, -1, 303, -1, 305, 306, 307, 308, 105,
- 310, -1, -1, 313, -1, 333, -1, 317, -1, -1,
- -1, 339, -1, -1, 273, 274, 273, 274, 467, -1,
- -1, 126, -1, 333, 272, -1, -1, 275, -1, 339,
- -1, -1, -1, -1, 467, 272, -1, 285, 275, -1,
- 465, 466, 41, 42, 150, -1, -1, -1, 285, -1,
- 40, 157, -1, -1, -1, 45, -1, -1, -1, -1,
- -1, 309, 40, -1, -1, -1, -1, 45, 316, -1,
- 318, -1, 309, -1, -1, -1, -1, -1, -1, 316,
- -1, -1, -1, -1, 465, 466, 334, 335, 336, 337,
- 338, -1, 340, 341, 342, 343, -1, 334, 335, 336,
- 275, 91, -1, 340, 210, -1, -1, -1, -1, -1,
- 285, 467, -1, 91, -1, 40, -1, -1, -1, -1,
- 45, -1, 228, -1, -1, -1, -1, 40, -1, -1,
- -1, 467, 45, 123, 309, -1, 126, 465, 466, -1,
- 59, 316, 61, -1, -1, 123, -1, -1, 126, -1,
- -1, 256, -1, -1, 260, 465, 466, -1, 264, 334,
- 335, 336, -1, -1, -1, 340, -1, 272, -1, -1,
- -1, -1, 277, 278, 279, -1, -1, 272, 283, -1,
- 275, 61, -1, -1, -1, -1, 272, -1, -1, 275,
- 285, -1, -1, 61, -1, -1, -1, 303, -1, 285,
- -1, 126, 307, 308, -1, 310, -1, -1, 467, -1,
- 467, -1, 317, 126, 309, 310, -1, -1, -1, -1,
- -1, 316, -1, 309, 310, 331, -1, -1, 333, -1,
- -1, -1, -1, -1, 339, -1, -1, -1, -1, 334,
- 335, 336, -1, -1, -1, 340, -1, -1, 334, 335,
- 336, -1, -1, -1, 340, -1, -1, -1, -1, -1,
- -1, -1, -1, 369, -1, 371, 256, -1, -1, -1,
- -1, -1, -1, 272, 380, -1, 275, -1, 256, -1,
- -1, -1, 272, -1, -1, 275, 285, 277, 278, 279,
- -1, -1, -1, 283, 272, 285, -1, -1, -1, 277,
- 278, 279, -1, -1, -1, 283, -1, -1, -1, -1,
- 309, 310, -1, -1, -1, -1, -1, 307, 308, 309,
- 310, -1, -1, -1, -1, -1, -1, 317, -1, 307,
- 308, -1, 310, -1, -1, 334, 335, 336, -1, 317,
- -1, 340, -1, 333, 334, 335, 336, 272, -1, 339,
- 340, -1, 277, 278, 279, 333, 41, -1, 283, 272,
- -1, 339, -1, -1, 277, 278, 279, -1, -1, -1,
- 283, -1, -1, -1, -1, -1, -1, 296, 297, 298,
- 299, -1, 307, 308, -1, 310, -1, -1, -1, -1,
- -1, -1, 317, -1, 307, 308, 315, 310, 278, 279,
- -1, -1, -1, -1, 317, 324, -1, 326, 333, 328,
- -1, 330, -1, 332, 339, -1, 296, 297, 298, 299,
- 333, -1, -1, -1, 109, 110, 339, -1, 296, 297,
- 298, 299, 117, 118, -1, 315, -1, -1, -1, -1,
- -1, -1, -1, 128, 324, -1, 326, 315, 328, -1,
- 330, -1, 332, -1, -1, -1, 324, -1, 326, -1,
- 328, -1, 330, -1, 332, -1, -1, 51, 52, -1,
- -1, -1, -1, -1, -1, 59, -1, 61, 62, -1,
- -1, -1, 167, -1, 68, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 195, 196, -1, -1, 199, -1, 201, -1, -1, 204,
- 104, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 224,
- -1, -1, -1, -1, -1, -1, -1, -1, 132, -1,
- 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
- 144, 145, 146, 147, 148, -1, -1, -1, -1, 254,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 170, 171, -1, 173,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 202, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 252, -1,
- -1, 255, 256,
- };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- int yydebug;
- int yynerrs;
- int yyerrflag;
- int yychar;
- short *yyssp;
- YYSTYPE *yyvsp;
- YYSTYPE yyval;
- YYSTYPE yylval;
-
- short yyss[600 ];
- YYSTYPE yyvs[600 ];
-
-
- void yyerror(str)
- char *str;
- {
- extern int num_parse_error;
-
- if (num_parse_error > 5)
- return;
- (void)fprintf( (&_iob[2]) , "%s: %s line %d\n", current_file, str,
- current_line);
- fflush( (&_iob[2]) );
- smart_log(current_file, current_line, str);
- if (num_parse_error == 0)
- save_error(str, current_file, current_line);
- num_parse_error++;
- }
-
- static int check_declared(str)
- char *str;
- {
- struct variable *vp;
- int offset;
-
- char * interned;
- extern char* findstring (char*) ;
-
- if (interned = findstring(str))
- for (offset=mem_block[ 3 ].current_size-sizeof(struct variable);
- offset >= 0;
- offset -= sizeof (struct variable))
- {
- vp = (struct variable *)&mem_block[ 3 ].block[offset];
- if (vp->flags & 0x8 )
- continue;
-
- if (vp->name == interned)
- return offset / sizeof (struct variable);
- }
- return -1;
- }
-
- static int verify_declared(str)
- char *str;
- {
- int r;
-
- r = check_declared(str);
- if (r < 0) {
- char buff[100];
- (void)sprintf(buff, "Variable %s not declared !", str);
- yyerror(buff);
- return -1;
- }
- return r;
- }
-
- void free_all_local_names()
- {
- int i;
-
- for (i=0; i<current_number_of_locals; i++) {
- xfree(local_names[i]);
- local_names[i] = 0;
- }
- current_number_of_locals = 0;
- current_break_stack_need = 0;
- max_break_stack_need = 0;
- }
-
- void add_local_name(str, type)
- char *str;
- int type;
- {
- if (current_number_of_locals == (configs[23].u.cf_int) )
- yyerror("Too many local variables");
- else {
- type_of_locals[current_number_of_locals] = type;
- local_names[current_number_of_locals++] = str;
- }
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
- static int copy_functions(from, type)
- struct program *from;
- int type;
- {
- int i, initializer = -1;
- unsigned short tmp_short;
-
- for (i=0; i < from->num_functions; i++) {
-
-
-
- struct function fun;
- int new_type, n;
-
- fun = from->functions[i];
-
-
-
- if (strchr(fun.name, ':') || fun.type & 0x0800 )
- fun.flags |= 0x8 ;
- if (fun.type & 0x0800 )
- fun.flags |= 0x1 ;
- fun.name = make_shared_string(fun.name);
- fun.offset = mem_block[ 5 ].current_size /
- sizeof (struct inherit) - 1;
- fun.function_index_offset = i;
- if ((n = defined_function(fun.name, 0)) >= 0) {
- struct function *funp;
-
- funp = &((struct function *)mem_block[ 1 ].block)[n];
- if (((fun.type & 0x0200 ) &&
- !(funp->flags & 0x2 ) &&
- !(fun.type & 0x0800 )) ||
-
- (funp->type & 0x0200 ) &&
- !(fun.type & 0x0800 ) &&
- !(funp->flags & 0x2 ))
- {
- char *p = (char *)alloca(80 + strlen(fun.name));
- sprintf(p, "Illegal to redefine 'nomask' function \"%s\"",
- fun.name);
- yyerror(p);
- }
- }
- if (fun.type & 0x0200 ) {
- fun.flags |= 0x1 ;
- } else if (!(fun.flags & 0x8 )) {
- fun.flags |= 0x2 ;
- }
-
-
-
-
- new_type = type;
- if (fun.type & 0x2000 )
- new_type &= ~0x0800 ;
- fun.type |= new_type;
-
-
-
-
- if (heart_beat == -1 && fun.name[0] == 'h' &&
- strcmp(fun.name, "heart_beat") == 0)
- {
- heart_beat = mem_block[ 1 ].current_size /
- sizeof (struct function);
- } else if (fun.name[0] == '_' && strcmp(fun.name, "__INIT") == 0) {
- initializer = i;
- fun.flags |= 0x1 ;
- }
- add_to_mem_block( 1 , (char *)&fun, sizeof fun);
-
-
-
-
- tmp_short = 65535 ;
- if (from->type_start != 0 && from->type_start[i] != 65535 )
- {
- int arg;
-
-
-
-
- tmp_short = mem_block[6 ].current_size /
- sizeof from->argument_types[0];
- for (arg = 0; arg < fun.num_arg; arg++) {
- add_to_mem_block(6 ,
- &from->argument_types[from->type_start[i]],
- sizeof (unsigned short));
- }
- }
-
-
-
-
- add_to_mem_block(7 , &tmp_short, sizeof tmp_short);
- }
- return initializer;
- }
-
-
-
-
-
-
- static void copy_variables(from, type)
- struct program *from;
- int type;
- {
- int i;
-
- for (i=0; i<from->num_variables; i++) {
- int new_type = type;
- int n = check_declared(from->variable_names[i].name);
-
- if (n != -1 && (((struct variable *)mem_block[ 3 ].block + (n)) ->type & 0x0200 )) {
- char *p = (char *)alloca(80 +
- strlen(from->variable_names[i].name));
- sprintf(p, "Illegal to redefine 'nomask' variable \"%s\"",
- ((struct variable *)mem_block[ 3 ].block + (n)) ->name);
- yyerror(p);
- }
-
-
-
-
- if (from->variable_names[i].type & 0x2000 )
- new_type &= ~0x0800 ;
- define_variable(from->variable_names[i].name,
- from->variable_names[i].type | new_type,
- from->variable_names[i].type & 0x0800 ?
- 0x8 : 0);
- }
- }
-
-
-
-
-
-
- void store_line_number_info()
- {
- unsigned short offset = mem_block[ 0 ].current_size;
-
- while(mem_block[ 4 ].current_size / sizeof (short) <
- current_line)
- {
- add_to_mem_block( 4 , (char *)&offset, sizeof offset);
- }
- }
-
- static char *get_type_name(type)
- int type;
- {
- static char buff[100];
- static char *type_name[] = { "unknown", "int", "string",
- "void", "object", "mixed", "mapping" };
- int pointer = 0;
-
- buff[0] = 0;
- if (type & 0x0100 )
- strcat(buff, "static ");
- if (type & 0x0200 )
- strcat(buff, "nomask ");
- if (type & 0x0800 )
- strcat(buff, "private ");
- if (type & 0x1000 )
- strcat(buff, "protected ");
- if (type & 0x2000 )
- strcat(buff, "public ");
- if (type & 0x4000 )
- strcat(buff, "varargs ");
- type &= (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ;
- if (type & 0x0400 ) {
- pointer = 1;
- type &= ~0x0400 ;
- }
- if (type >= sizeof type_name / sizeof type_name[0])
- fatal("Bad type\n");
- strcat(buff, type_name[type]);
- strcat(buff," ");
- if (pointer)
- strcat(buff, "* ");
- return buff;
- }
-
- void type_error(str, type)
- char *str;
- int type;
- {
- static char buff[100];
- char *p;
- p = get_type_name(type);
- if (strlen(str) + strlen(p) + 5 >= sizeof buff) {
- yyerror(str);
- } else {
- strcpy(buff, str);
- strcat(buff, ": \"");
- strcat(buff, p);
- strcat(buff, "\"");
- yyerror(buff);
- }
- }
-
-
-
-
- void compile_file() {
- int yyparse();
-
- prolog();
- yyparse();
- epilog();
- }
-
- static char *get_two_types(type1, type2)
- int type1, type2;
- {
- static char buff[100];
-
- strcpy(buff, "( ");
- strcat(buff, get_type_name(type1));
- strcat(buff, "vs ");
- strcat(buff, get_type_name(type2));
- strcat(buff, ")");
- return buff;
- }
-
-
-
-
- void epilog() {
- int size, i;
- char *p;
- struct function *funp;
- static int current_id_number = 1;
-
-
- if (num_parse_error == 0 && type_of_arguments.current_size != 0)
- fatal("Failed to deallocate argument type stack\n");
-
-
-
-
-
- if (first_last_initializer_end != last_initializer_end) {
- define_new_function("__INIT", 0, 0, 0, 0, 0);
-
-
-
-
- mem_block[ 0 ].block[last_initializer_end-1] =
- 270 - 257 ;
- mem_block[ 0 ].block[last_initializer_end-0] =
- 276 - 257 ;
- }
-
-
-
-
-
- for (i = 0; i < mem_block[ 1 ].current_size; i += sizeof *funp) {
- funp = (struct function *)(mem_block[ 1 ].block + i);
- if (!(funp->flags & 0x2 ))
- continue;
- find_inherited(funp);
- }
- if (num_parse_error > 0) {
- prog = 0;
- for (i=0; i< 11 ; i++)
- xfree(mem_block[i].block);
- return;
- }
- size = (((sizeof (struct program)) + 3) & ~3) ;
- for (i=0; i< 8 ; i++)
- size += (((mem_block[i].current_size) + 3) & ~3) ;
- p = (char *)xalloc(size);
- prog = (struct program *)p;
- *prog = NULL_program;
- prog->total_size = size;
- prog->ref = 0;
- prog->heart_beat = heart_beat;
- prog->name = string_copy(current_file);
- prog->id_number = current_id_number++;
- total_prog_block_size += prog->total_size;
- total_num_prog_blocks += 1;
-
- p += (((sizeof (struct program)) + 3) & ~3) ;
- prog->program = p;
- if (mem_block[ 0 ].current_size)
- memcpy(p, mem_block[ 0 ].block,
- mem_block[ 0 ].current_size);
- prog->program_size = mem_block[ 0 ].current_size;
-
- p += (((mem_block[ 0 ].current_size) + 3) & ~3) ;
- prog->line_numbers = (unsigned short *)p;
- if (mem_block[ 4 ].current_size)
- memcpy(p, mem_block[ 4 ].block,
- mem_block[ 4 ].current_size);
-
- p += (((mem_block[ 4 ].current_size) + 3) & ~3) ;
- prog->functions = (struct function *)p;
- prog->num_functions = mem_block[ 1 ].current_size /
- sizeof (struct function);
- if (mem_block[ 1 ].current_size)
- memcpy(p, mem_block[ 1 ].block,
- mem_block[ 1 ].current_size);
-
- p += (((mem_block[ 1 ].current_size) + 3) & ~3) ;
- prog->strings = (char **)p;
- prog->num_strings = mem_block[ 2 ].current_size /
- sizeof (char *);
- if (mem_block[ 2 ].current_size)
- memcpy(p, mem_block[ 2 ].block,
- mem_block[ 2 ].current_size);
-
- p += (((mem_block[ 2 ].current_size) + 3) & ~3) ;
- prog->variable_names = (struct variable *)p;
- prog->num_variables = mem_block[ 3 ].current_size /
- sizeof (struct variable);
- if (mem_block[ 3 ].current_size)
- memcpy(p, mem_block[ 3 ].block,
- mem_block[ 3 ].current_size);
-
- p += (((mem_block[ 3 ].current_size) + 3) & ~3) ;
- prog->num_inherited = mem_block[ 5 ].current_size /
- sizeof (struct inherit);
- if (prog->num_inherited) {
- memcpy(p, mem_block[ 5 ].block,
- mem_block[ 5 ].current_size);
- prog->inherit = (struct inherit *)p;
- } else
- prog->inherit = 0;
-
- prog->argument_types = 0;
-
- prog->type_start = 0;
- for (i=0; i< 11 ; i++)
- xfree((char *)mem_block[i].block);
-
-
-
-
-
-
- reference_prog (prog, "epilog");
- for (i = 0; i < prog->num_inherited; i++) {
- reference_prog (prog->inherit[i].prog, "inheritance");
- }
- }
-
-
-
-
- static void prolog() {
- int i;
-
- if (type_of_arguments.block == 0) {
- type_of_arguments.max_size = 100;
- type_of_arguments.block = xalloc(type_of_arguments.max_size);
- }
- type_of_arguments.current_size = 0;
- approved_object = 0;
- last_push_indexed = -1;
- last_push_local = -1;
- last_push_identifier = -1;
- prog = 0;
- heart_beat = -1;
- comp_stackp = 0;
- current_continue_address = 0;
- current_break_address = 0;
- num_parse_error = 0;
- free_all_local_names();
-
-
-
- for (i=0; i < 11 ; i++) {
- mem_block[i].block = xalloc(4096 );
- mem_block[i].current_size = 0;
- mem_block[i].max_size = 4096 ;
- }
- add_new_init_jump();
- first_last_initializer_end = last_initializer_end;
- }
-
-
-
-
- void add_new_init_jump() {
-
-
-
- ins_f_byte(257 );
- last_initializer_end = mem_block[ 0 ].current_size;
- ins_short(0);
- }
-
-
-
-
- int
- yyparse()
- {
- register int yym, yyn, yystate;
-
-
- yynerrs = 0;
- yyerrflag = 0;
- yychar = (-1);
-
- yyssp = yyss;
- yyvsp = yyvs;
- *yyssp = yystate = 0;
-
- yyloop:
- if (yyn = yydefred[yystate]) goto yyreduce;
- if (yychar < 0)
- {
- if ((yychar = yylex()) < 0) yychar = 0;
-
- }
- if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
- yyn <= 2153 && yycheck[yyn] == yychar)
- {
-
-
-
-
-
- if (yyssp >= yyss + 600 - 1)
- {
- goto yyoverflow;
- }
- *++yyssp = yystate = yytable[yyn];
- *++yyvsp = yylval;
- yychar = (-1);
- if (yyerrflag > 0) --yyerrflag;
- goto yyloop;
- }
- if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
- yyn <= 2153 && yycheck[yyn] == yychar)
- {
- yyn = yytable[yyn];
- goto yyreduce;
- }
- if (yyerrflag) goto yyinrecovery;
-
-
-
- yynewerror:
- yyerror("syntax error");
-
-
-
- yyerrlab:
- ++yynerrs;
- yyinrecovery:
- if (yyerrflag < 3)
- {
- yyerrflag = 3;
- for (;;)
- {
- if ((yyn = yysindex[*yyssp]) && (yyn += 256 ) >= 0 &&
- yyn <= 2153 && yycheck[yyn] == 256 )
- {
-
-
-
-
-
- if (yyssp >= yyss + 600 - 1)
- {
- goto yyoverflow;
- }
- *++yyssp = yystate = yytable[yyn];
- *++yyvsp = yylval;
- goto yyloop;
- }
- else
- {
-
-
-
-
-
- if (yyssp <= yyss) goto yyabort;
- --yyssp;
- --yyvsp;
- }
- }
- }
- else
- {
- if (yychar == 0) goto yyabort;
-
- yychar = (-1);
- goto yyloop;
- }
- yyreduce:
-
-
-
-
-
- yym = yylen[yyn];
- yyval = yyvsp[1-yym];
- switch (yyn)
- {
- case 5:
-
- { yyerror("Extra ';'. Ignored."); }
- break;
- case 6:
-
- {
- struct object *ob;
- struct inherit inherit;
- int initializer;
-
- ob = find_object2(yyvsp[-1].string );
- if (ob == 0) {
- inherit_file = yyvsp[-1].string ;
-
- goto yyaccept ;
- }
- xfree(yyvsp[-1].string );
- if (ob->flags & 0x80 )
- approved_object = 1;
- inherit.prog = ob->prog;
- inherit.function_index_offset =
- mem_block[ 1 ].current_size /
- sizeof (struct function);
- inherit.variable_index_offset =
- mem_block[ 3 ].current_size /
- sizeof (struct variable);
- inherit.type = yyvsp[-3].number ;
- add_to_mem_block( 5 , &inherit, sizeof inherit);
- copy_variables(ob->prog, yyvsp[-3].number );
- initializer = copy_functions(ob->prog, yyvsp[-3].number );
- if (initializer > 0) {
- struct function *funp;
- int f;
- f = define_new_function("::__INIT", 0, 0, 0, 0, 0);
- funp = ((struct function *)mem_block[ 1 ].block + (f)) ;
- funp->offset = mem_block[ 5 ].current_size /
- sizeof (struct inherit) - 1;
- funp->flags = 0x4 |
- 0x1 | 0x8 ;
- funp->type = 3 ;
- funp->function_index_offset = initializer;
- transfer_init_control();
- ins_f_byte(263 );
- ins_short(f);
- ins_byte(0);
- ins_f_byte(260 );
- add_new_init_jump();
- }
- }
- break;
- case 7:
-
- {
- if ( yyvsp[0].number == 0 ) {
- ins_f_byte(269 ); yyval.type = 5 ;
- } else if ( yyvsp[0].number == 1 ) {
- ins_f_byte(270 ); yyval.type = 1 ;
- } else {
- ins_f_byte(283 ); ins_long(yyvsp[0].number ); yyval.type = 1 ;
- }
- }
- break;
- case 8:
-
- { yyval.number = 0; }
- break;
- case 9:
-
- { yyval.number = 0x0400 ; }
- break;
- case 10:
-
- { yyval.number = 0; }
- break;
- case 11:
-
- { yyval.number = ';'; }
- break;
- case 12:
-
- {
-
- push_explicit(mem_block[ 0 ].current_size);
-
- if (yyvsp[-2].number & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) {
- exact_types = yyvsp[-2].number | yyvsp[-1].number ;
- } else {
- if (pragma_strict_types)
- yyerror("\"#pragma strict_types\" requires type of function");
- exact_types = 0;
- }
- }
- break;
- case 13:
-
- {
-
-
-
-
- define_new_function(yyvsp[-4].string , yyvsp[-1].number , 0, 0,
- 0x2 | 0x10 , yyvsp[-6].number | yyvsp[-5].number );
- }
- break;
- case 14:
-
- {
-
- if (yyvsp[0].number == ';') {
- (void)pop_address();
- } else {
- define_new_function(yyvsp[-6].string , yyvsp[-3].number , current_number_of_locals - yyvsp[-3].number +
- ( max_break_stack_need -1 ) / sizeof(struct svalue) +1,
- pop_address(), 0, yyvsp[-8].number | yyvsp[-7].number );
- ins_f_byte(269 ); ins_f_byte(276 );
- }
- free_all_local_names();
- xfree(yyvsp[-6].string );
- }
- break;
- case 15:
-
- { if (yyvsp[-2].number == 0) yyerror("Missing type"); }
- break;
- case 17:
-
- {
- if (exact_types && yyvsp[-2].number == 0) {
- yyerror("Missing type for argument");
- add_local_name(yyvsp[0].string , 5 );
- } else {
- add_local_name(yyvsp[0].string , yyvsp[-2].number | yyvsp[-1].number );
- }
- }
- break;
- case 18:
-
- {yyerror("Illegal to redeclare local name"); }
- break;
- case 19:
-
- { yyval.number = 0; }
- break;
- case 21:
-
- { yyval.number = 1; }
- break;
- case 22:
-
- { yyval.number = yyvsp[-2].number + 1; }
- break;
- case 23:
-
- { yyval.number = 0x0200 ; }
- break;
- case 24:
-
- { yyval.number = 0x0100 ; }
- break;
- case 25:
-
- { yyval.number = 0x0800 ; }
- break;
- case 26:
-
- { yyval.number = 0x2000 ; }
- break;
- case 27:
-
- { yyval.number = 0x4000 ; }
- break;
- case 28:
-
- { yyval.number = 0x1000 ; }
- break;
- case 29:
-
- { yyval.number = 0; }
- break;
- case 30:
-
- { yyval.number = yyvsp[-1].number | yyvsp[0].number ; }
- break;
- case 31:
-
- { yyval.number = yyvsp[-1].number | yyvsp[0].number ; current_type = yyval.number ; }
- break;
- case 32:
-
- {
- yyval.type = yyvsp[-2].number | yyvsp[-1].number ;
- }
- break;
- case 34:
-
- { yyval.number = 0 ; }
- break;
- case 35:
-
- { yyval.number = 1 ; current_type = yyval.number ; }
- break;
- case 36:
-
- { yyval.number = 1 ; current_type = yyval.number ; }
- break;
- case 37:
-
- { yyval.number = 2 ; current_type = yyval.number ; }
- break;
- case 38:
-
- { yyval.number = 4 ; current_type = yyval.number ; }
- break;
- case 39:
-
- {yyval.number = 3 ; current_type = yyval.number ; }
- break;
- case 40:
-
- { yyval.number = 5 ; current_type = yyval.number ; }
- break;
- case 41:
-
- { yyval.number = 6 ; current_type = yyval.number ; }
- break;
- case 44:
-
- {
- define_variable(yyvsp[0].string , current_type | yyvsp[-1].number , 0);
- xfree(yyvsp[0].string );
- }
- break;
- case 45:
-
- {
- int var_num;
- define_variable(yyvsp[0].string , current_type | yyvsp[-1].number , 0);
- var_num = verify_declared(yyvsp[0].string );
- transfer_init_control();
- ins_f_byte(264 );
- ins_byte(var_num);
- }
- break;
- case 46:
-
- {
- if (!compatible_types((current_type | yyvsp[-4].number ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) , yyvsp[0].type )){
- char buff[100];
- sprintf(buff, "Type mismatch %s when initializing %s",
- get_two_types(current_type | yyvsp[-4].number , yyvsp[0].type ), yyvsp[-3].string );
- yyerror(buff);
- }
- ins_f_byte(284 );
- ins_f_byte(260 );
- add_new_init_jump();
- xfree(yyvsp[-3].string );
- }
- break;
- case 47:
-
- { ; }
- break;
- case 50:
-
- {
- add_local_name(yyvsp[0].string , current_type | yyvsp[-1].number );
- }
- break;
- case 56:
-
- {
- ins_f_byte(260 );
- if (d_flag)
- ins_f_byte(350 );
-
-
- }
- break;
- case 67:
-
- {
- if (current_break_address == 0)
- yyerror("break statement outside loop");
- if (current_break_address & 0x40000 ) {
- ins_f_byte(303 );
- } else {
- ins_f_byte(257 ); ins_short(current_break_address);
- }
- }
- break;
- case 68:
-
- {
- if (current_continue_address == 0)
- yyerror("continue statement outside loop");
- ins_f_byte(257 ); ins_short(current_continue_address);
- }
- break;
- case 69:
-
- { push_explicit(current_continue_address);
- push_explicit(current_break_address);
- current_continue_address = mem_block[ 0 ].current_size;
- }
- break;
- case 70:
-
- {
- ins_f_byte(259 ); ins_short(0);
- current_break_address = mem_block[ 0 ].current_size;
- ins_f_byte(257 ); ins_short(0);
- upd_short(current_break_address-2,
- mem_block[ 0 ].current_size);
- }
- break;
- case 71:
-
- {
- ins_f_byte(257 ); ins_short(current_continue_address);
- upd_short(current_break_address+1,
- mem_block[ 0 ].current_size);
- current_break_address = pop_address();
- current_continue_address = pop_address();
- }
- break;
- case 72:
-
- {
- int tmp_save;
- push_explicit(current_continue_address);
- push_explicit(current_break_address);
-
- ins_f_byte(257 ); tmp_save = mem_block[ 0 ].current_size;
- ins_short(0);
- current_break_address = mem_block[ 0 ].current_size;
-
- ins_f_byte(257 ); push_address(); ins_short(0);
- current_continue_address = mem_block[ 0 ].current_size;
- upd_short(tmp_save, current_continue_address);
- push_address();
-
- }
- break;
- case 73:
-
- {
- ins_f_byte(259 ); ins_short(pop_address());
-
- upd_short(pop_address(), mem_block[ 0 ].current_size);
- current_break_address = pop_address();
- current_continue_address = pop_address();
- }
- break;
- case 74:
-
- { push_explicit(current_continue_address);
- push_explicit(current_break_address); }
- break;
- case 75:
-
- { ins_f_byte(260 );
- push_address();
- }
- break;
- case 76:
-
- {
- ins_f_byte(259 );
- ins_short(0);
- current_break_address = mem_block[ 0 ].current_size;
- ins_f_byte(257 ); ins_short(0);
- current_continue_address =
- mem_block[ 0 ].current_size;
- }
- break;
- case 77:
-
- {
- ins_f_byte(260 );
- ins_f_byte(257 ); ins_short(pop_address());
-
- upd_short(current_break_address-2,
- mem_block[ 0 ].current_size);
- }
- break;
- case 78:
-
- {
- ins_f_byte(257 ); ins_short(current_continue_address);
-
- upd_short(current_break_address+1, mem_block[ 0 ].current_size);
- current_break_address = pop_address();
- current_continue_address = pop_address();
- }
- break;
- case 79:
-
- { ins_f_byte(270 ); }
- break;
- case 81:
-
- {
- current_break_stack_need += sizeof(short);
- if ( current_break_stack_need > max_break_stack_need )
- max_break_stack_need = current_break_stack_need;
- push_explicit(current_case_number_heap);
- push_explicit(current_case_string_heap);
- push_explicit(zero_case_label);
- push_explicit(current_break_address);
- ins_f_byte(306 );
- ins_byte(0xff);
- current_case_number_heap = mem_block[ 8 ].current_size;
- current_case_string_heap = mem_block[ 9 ].current_size;
- zero_case_label = 0x80000 ;
- ins_short(0);
- current_break_address = mem_block[ 0 ].current_size |
- 0x40000 | 0x80000 ;
- ins_short(0);
- ins_short(0);
- }
- break;
- case 82:
-
- {
- char *heap_start;
- int heap_end_offs;
- int i,o;
- int current_key,last_key;
-
- int block_index;
- int current_case_heap;
- int lookup_start;
- int lookup_start_key;
-
- current_break_address &= ~( 0x40000 | 0x80000 );
-
- if ( !read_short(current_break_address+2 ) )
- upd_short(current_break_address+2,
- mem_block[ 0 ].current_size);
-
-
- ins_f_byte(303 );
- if(zero_case_label & ( 0x80000 |0x40000 )){
- block_index = 8 ;
- current_case_heap = current_case_number_heap;
- } else {
- block_index = 9 ;
- current_case_heap = current_case_string_heap;
- if (zero_case_label&0xffff) {
- struct case_heap_entry temp;
-
- temp.key = (int) 0 ;
- temp.addr = zero_case_label;
- temp.line = 0;
-
- add_to_case_heap( 9 ,&temp);
- }
- }
- heap_start = mem_block[block_index].block + current_case_heap ;
- heap_end_offs = mem_block[block_index].current_size -current_case_heap;
- if (!heap_end_offs) yyerror("switch without case not supported");
-
-
-
-
- add_to_mem_block(block_index, "\0\0\0\0\0\0\0\0",
- sizeof(struct case_heap_entry) );
-
-
-
-
-
- mem_block[ 10 ].current_size = 0;
- lookup_start = 0;
- lookup_start_key = ((struct case_heap_entry*)heap_start)->key;
- for( ; ((struct case_heap_entry*)heap_start)->addr; )
- {
- int offset;
- int curr_line,last_line;
- unsigned short current_addr,last_addr = 0xffff;
- int range_start;
-
- current_key = ((struct case_heap_entry*)heap_start)->key ;
- curr_line = ((struct case_heap_entry*)heap_start)->line ;
- current_addr = ((struct case_heap_entry*)heap_start)->addr ;
- if ( current_key == last_key &&
- mem_block[ 10 ].current_size )
- {
- char buf[90];
-
- sprintf(buf,"Duplicate case in line %d and %d",
- last_line, curr_line);
- yyerror(buf);
- }
- if (curr_line) {
- if (last_addr == 1) {
- char buf[120];
-
- sprintf(buf,
- "Discontinued case label list range, line %d by line %d",
- last_line, curr_line);
- yyerror(buf);
- }
- else if (current_key == last_key + 1
- && current_addr == last_addr) {
- if (mem_block[ 10 ].current_size
- != range_start + 6) {
- *(short*)(mem_block[ 10 ].block+range_start+4)
- =1;
- mem_block[ 10 ].current_size = range_start + 6;
- }
- } else {
- range_start = mem_block[ 10 ].current_size;
- }
- }
- last_key = current_key;
- last_line = curr_line;
- last_addr = current_addr;
- add_to_mem_block( 10 ,
- (char *)¤t_key, sizeof(long) );
- add_to_mem_block( 10 ,
- (char *)¤t_addr, sizeof(short) );
- for ( offset = 0; ; )
- {
-
- int child1,child2;
-
- child1 = ( offset << 1 ) + sizeof(struct case_heap_entry);
- child2 = child1 + sizeof(struct case_heap_entry);
- if ( child1 >= heap_end_offs ) break;
- if ( ((struct case_heap_entry*)(heap_start+child1))->addr &&
- ( !((struct case_heap_entry*)(heap_start+child2))->addr ||
- ((struct case_heap_entry*)(heap_start+child1))->key <=
- ((struct case_heap_entry*)(heap_start+child2))->key ) )
- {
- *(struct case_heap_entry*)(heap_start+offset) =
- *(struct case_heap_entry*)(heap_start+child1);
- offset = child1;
- } else
- if (((struct case_heap_entry*)(heap_start+child2))->addr ) {
- *(struct case_heap_entry*)(heap_start+offset) =
- *(struct case_heap_entry*)(heap_start+child2);
- offset = child2;
- } else break;
- }
- ((struct case_heap_entry*)(heap_start+offset))->addr = 0;
- }
-
-
- upd_short(current_break_address-2,
- mem_block[ 0 ].current_size);
-
- add_to_mem_block( 0 , mem_block[ 10 ].block,
- mem_block[ 10 ].current_size );
-
- for(i=0xf0,o=6; o<<1 <= mem_block[ 10 ].current_size; )
- i++,o<<=1;
- if (block_index == 9 ) i = ( i << 4 ) | 0xf;
-
- mem_block[ 0 ].block[current_break_address-3] &= i;
-
- upd_short(current_break_address, mem_block[ 0 ].current_size);
-
- mem_block[ 8 ].current_size = current_case_number_heap;
- mem_block[ 9 ].current_size = current_case_string_heap;
- current_break_address = pop_address();
- zero_case_label = pop_address();
- current_case_string_heap = pop_address();
- current_case_number_heap = pop_address();
- current_break_stack_need -= sizeof(short);
- }
- break;
- case 83:
-
- {
- struct case_heap_entry temp;
-
- if ( !( current_break_address & 0x80000 ) ) {
- yyerror("Case outside switch");
- break;
- }
- temp.key = yyvsp[-1].case_label .key;
- temp.addr = mem_block[ 0 ].current_size;
- temp.line = current_line;
- add_to_case_heap(yyvsp[-1].case_label .block,&temp);
- }
- break;
- case 84:
-
- {
- struct case_heap_entry temp;
-
- if ( yyvsp[-3].case_label .block != 8 || yyvsp[-1].case_label .block != 8 )
- yyerror("String case labels not allowed as range bounds");
- if (yyvsp[-3].case_label .key > yyvsp[-1].case_label .key) break;
- temp.key = yyvsp[-3].case_label .key;
- temp.addr = 1;
- temp.line = current_line;
- add_to_case_heap( 8 ,&temp);
- temp.key = yyvsp[-1].case_label .key;
- temp.addr = mem_block[ 0 ].current_size;
- temp.line = 0;
- add_to_case_heap( 8 ,&temp);
- }
- break;
- case 85:
-
- {
- if ( !(zero_case_label & 0x80000 ) )
- yyerror("Mixed case label list not allowed");
- if ( yyval.case_label .key = yyvsp[0].number )
- zero_case_label |= 0x40000 ;
- else
- zero_case_label |= mem_block[ 0 ].current_size;
- yyval.case_label .block = 8 ;
- }
- break;
- case 86:
-
- {
- if ( zero_case_label & 0x40000 )
- yyerror("Mixed case label list not allowed");
- zero_case_label &= ~ 0x80000 ;
- store_prog_string(yyvsp[0].string );
- yyval.case_label .key = (int)yyvsp[0].string ;
- yyval.case_label .block = 9 ;
- }
- break;
- case 88:
-
- { yyval.number = yyvsp[-2].number | yyvsp[0].number ; }
- break;
- case 90:
-
- { yyval.number = yyvsp[-2].number ^ yyvsp[0].number ; }
- break;
- case 92:
-
- { yyval.number = yyvsp[-2].number & yyvsp[0].number ; }
- break;
- case 94:
-
- { yyval.number = yyvsp[-2].number == yyvsp[0].number ; }
- break;
- case 95:
-
- { yyval.number = yyvsp[-2].number != yyvsp[0].number ; }
- break;
- case 97:
-
- { yyval.number = yyvsp[-2].number > yyvsp[0].number ; }
- break;
- case 98:
-
- { yyval.number = yyvsp[-2].number >= yyvsp[0].number ; }
- break;
- case 99:
-
- { yyval.number = yyvsp[-2].number < yyvsp[0].number ; }
- break;
- case 100:
-
- { yyval.number = yyvsp[-2].number <= yyvsp[0].number ; }
- break;
- case 102:
-
- { yyval.number = yyvsp[-2].number << yyvsp[0].number ; }
- break;
- case 103:
-
- { yyval.number = yyvsp[-2].number >> yyvsp[0].number ; }
- break;
- case 105:
-
- { yyval.number = yyvsp[-2].number + yyvsp[0].number ; }
- break;
- case 106:
-
- { yyval.number = yyvsp[-2].number - yyvsp[0].number ; }
- break;
- case 108:
-
- { yyval.number = yyvsp[-2].number * yyvsp[0].number ; }
- break;
- case 109:
-
- { yyval.number = yyvsp[-2].number % yyvsp[0].number ; }
- break;
- case 110:
-
- { yyval.number = yyvsp[-2].number / yyvsp[0].number ; }
- break;
- case 112:
-
- { yyval.number = yyvsp[-1].number ; }
- break;
- case 114:
-
- { yyval.number = -yyvsp[0].number ; }
- break;
- case 115:
-
- { yyval.number = !yyvsp[0].number ; }
- break;
- case 116:
-
- { yyval.number = ~yyvsp[0].number ; }
- break;
- case 117:
-
- {
- if ( !( current_break_address & 0x80000 ) ) {
- yyerror("Default outside switch");
- break;
- }
- current_break_address &= ~( 0x40000 | 0x80000 );
- if ( read_short(current_break_address+2 ) )
- yyerror("Duplicate default");
- upd_short(current_break_address+2, mem_block[ 0 ].current_size);
- current_break_address |= ( 0x40000 | 0x80000 );
- }
- break;
- case 118:
-
- { yyval.type = yyvsp[0].type ; }
- break;
- case 119:
-
- { ins_f_byte(260 ); }
- break;
- case 120:
-
- { yyval.type = yyvsp[0].type ; }
- break;
- case 122:
-
- {
- if (exact_types && !compatible_types(yyvsp[-2].type , yyvsp[0].type ) &&
- !(yyvsp[-2].type == 2 && yyvsp[0].type == 1 && yyvsp[-1].number == 296 ))
- {
- type_error("Bad assignment. Rhs", yyvsp[0].type );
- }
- ins_f_byte(yyvsp[-1].number );
- yyval.type = yyvsp[0].type ;
- }
- break;
- case 123:
-
- { yyerror("Illegal LHS"); yyval.type = 5 ; }
- break;
- case 124:
-
- { yyval.type = yyvsp[0].type ; }
- break;
- case 125:
-
- {
- ins_f_byte(258 );
- push_address();
- ins_short(0);
- }
- break;
- case 126:
-
- {
- int i;
- i = pop_address();
- ins_f_byte(257 ); push_address(); ins_short(0);
- upd_short(i, mem_block[ 0 ].current_size);
- }
- break;
- case 127:
-
- {
- upd_short(pop_address(), mem_block[ 0 ].current_size);
- if (exact_types && !compatible_types(yyvsp[-3].type , yyvsp[0].type )) {
- type_error("Different types in ?: expr", yyvsp[-3].type );
- type_error(" and ", yyvsp[0].type );
- }
- if (yyvsp[-3].type == 5 ) yyval.type = yyvsp[0].type ;
- else if (yyvsp[0].type == 5 ) yyval.type = yyvsp[-3].type ;
- else if (((((yyvsp[-3].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-3].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 0x0400 |5 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 0x0400 |5 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-3].type ) & 0x0400 ) && (( 0x0400 |5 ) & 0x0400 ) && (((yyvsp[-3].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-3].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 0x0400 |5 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 0x0400 |5 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) ) yyval.type = yyvsp[0].type ;
- else if (((((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 0x0400 |5 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 0x0400 |5 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[0].type ) & 0x0400 ) && (( 0x0400 |5 ) & 0x0400 ) && (((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 0x0400 |5 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 0x0400 |5 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) ) yyval.type = yyvsp[-3].type ;
- else yyval.type = yyvsp[-3].type ;
- }
- break;
- case 128:
-
- { yyval.number = 284 ; }
- break;
- case 129:
-
- { yyval.number = 324 ; }
- break;
- case 130:
-
- { yyval.number = 326 ; }
- break;
- case 131:
-
- { yyval.number = 328 ; }
- break;
- case 132:
-
- { yyval.number = 330 ; }
- break;
- case 133:
-
- { yyval.number = 332 ; }
- break;
- case 134:
-
- { yyval.number = 296 ; }
- break;
- case 135:
-
- { yyval.number = 297 ; }
- break;
- case 136:
-
- { yyval.number = 299 ; }
- break;
- case 137:
-
- { yyval.number = 315 ; }
- break;
- case 138:
-
- { yyval.number = 298 ; }
- break;
- case 139:
-
- {
- if (exact_types && !((((exact_types) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((exact_types) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 3 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 3 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((exact_types) & 0x0400 ) && (( 3 ) & 0x0400 ) && (((exact_types) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((exact_types) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 3 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 3 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Must return a value for a function declared",
- exact_types);
- ins_f_byte(269 );
- ins_f_byte(276 );
- }
- break;
- case 140:
-
- {
- if (exact_types && !((((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( exact_types & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( exact_types & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[0].type ) & 0x0400 ) && (( exact_types & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) & 0x0400 ) && (((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( exact_types & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( exact_types & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Return type not matching", exact_types);
- ins_f_byte(276 );
- }
- break;
- case 141:
-
- { yyval.number = 0; }
- break;
- case 142:
-
- { yyval.number = yyvsp[0].number ; }
- break;
- case 143:
-
- { yyval.number = yyvsp[-1].number ; }
- break;
- case 144:
-
- { yyval.number = 1; add_arg_type(yyvsp[0].type ); }
- break;
- case 145:
-
- { yyval.number = yyvsp[-2].number + 1; add_arg_type(yyvsp[0].type ); }
- break;
- case 146:
-
- { yyval.number = 0; }
- break;
- case 147:
-
- { yyval.number = yyvsp[0].number ; }
- break;
- case 148:
-
- { yyval.number = yyvsp[-1].number ; }
- break;
- case 149:
-
- { yyval.number = 2; add_arg_type(yyvsp[-2].type ); add_arg_type(yyvsp[0].type ); }
- break;
- case 150:
-
- { yyval.number = yyvsp[-4].number + 2; add_arg_type(yyvsp[-2].type ); add_arg_type(yyvsp[0].type ); }
- break;
- case 151:
-
- { yyval.type = yyvsp[0].type ; }
- break;
- case 152:
-
- {
- ins_f_byte(261 ); ins_f_byte(259 );
- push_address();
- ins_short(0);
- ins_f_byte(260 );
- }
- break;
- case 153:
-
- {
- upd_short(pop_address(), mem_block[ 0 ].current_size);
- if (yyvsp[-3].type == yyvsp[0].type )
- yyval.type = yyvsp[-3].type ;
- else
- yyval.type = 5 ;
- }
- break;
- case 154:
-
- { yyval.type = yyvsp[0].type ; }
- break;
- case 155:
-
- {
- ins_f_byte(261 ); ins_f_byte(258 );
- push_address();
- ins_short(0);
- ins_f_byte(260 );
- }
- break;
- case 156:
-
- {
- upd_short(pop_address(), mem_block[ 0 ].current_size);
- if (yyvsp[-3].type == yyvsp[0].type )
- yyval.type = yyvsp[-3].type ;
- else
- yyval.type = 5 ;
- }
- break;
- case 158:
-
- {
- if (exact_types && !((((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( (1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( (1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-2].type ) & 0x0400 ) && ((1 ) & 0x0400 ) && (((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( (1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( (1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument 1 to |", yyvsp[-2].type );
- if (exact_types && !((((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( (1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( (1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[0].type ) & 0x0400 ) && ((1 ) & 0x0400 ) && (((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( (1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( (1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument 2 to |", yyvsp[0].type );
- yyval.type = 1 ;
- ins_f_byte(325 );
- }
- break;
- case 160:
-
- {
- if (exact_types && !((((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( (1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( (1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-2].type ) & 0x0400 ) && ((1 ) & 0x0400 ) && (((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( (1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( (1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument 1 to ^", yyvsp[-2].type );
- if (exact_types && !((((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( (1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( (1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[0].type ) & 0x0400 ) && ((1 ) & 0x0400 ) && (((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( (1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( (1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument 2 to ^", yyvsp[0].type );
- yyval.type = 1 ;
- ins_f_byte(327 );
- }
- break;
- case 162:
-
- {
- ins_f_byte(323 );
- if ( !((((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( (0x0400 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( (0x0400 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-2].type ) & 0x0400 ) && ((0x0400 ) & 0x0400 ) && (((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( (0x0400 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( (0x0400 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) || !((((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( (0x0400 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( (0x0400 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[0].type ) & 0x0400 ) && ((0x0400 ) & 0x0400 ) && (((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( (0x0400 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( (0x0400 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) ) {
- if (exact_types && !((((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( (1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( (1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-2].type ) & 0x0400 ) && ((1 ) & 0x0400 ) && (((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( (1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( (1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument 1 to &", yyvsp[-2].type );
- if (exact_types && !((((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( (1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( (1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[0].type ) & 0x0400 ) && ((1 ) & 0x0400 ) && (((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( (1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( (1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument 2 to &", yyvsp[0].type );
- }
- yyval.type = 1 ;
- }
- break;
- case 164:
-
- {
- int t1 = yyvsp[-2].type & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) , t2 = yyvsp[0].type & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ;
- if (exact_types && t1 != t2 && t1 != 5 && t2 != 5 ) {
- type_error("== always false because of different types", yyvsp[-2].type );
- type_error(" compared to", yyvsp[0].type );
- }
- ins_f_byte(292 );
- yyval.type = 1 ;
- }
- break;
- case 165:
-
- {
- int t1 = yyvsp[-2].type & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) , t2 = yyvsp[0].type & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ;
- if (exact_types && t1 != t2 && t1 != 5 && t2 != 5 ) {
- type_error("!= always true because of different types", yyvsp[-2].type );
- type_error(" compared to", yyvsp[0].type );
- }
- ins_f_byte(295 );
- yyval.type = 1 ;
- }
- break;
- case 167:
-
- { yyval.type = 1 ; ins_f_byte(291 ); }
- break;
- case 168:
-
- { yyval.type = 1 ; ins_f_byte(293 ); }
- break;
- case 169:
-
- { yyval.type = 1 ; ins_f_byte(290 ); }
- break;
- case 170:
-
- { yyval.type = 1 ; ins_f_byte(294 ); }
- break;
- case 172:
-
- {
- ins_f_byte(329 );
- yyval.type = 1 ;
- if (exact_types && !((((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-2].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument number 1 to '<<'", yyvsp[-2].type );
- if (exact_types && !((((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[0].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument number 2 to '<<'", yyvsp[0].type );
- }
- break;
- case 173:
-
- {
- ins_f_byte(331 );
- yyval.type = 1 ;
- if (exact_types && !((((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-2].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument number 1 to '>>'", yyvsp[-2].type );
- if (exact_types && !((((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[0].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument number 2 to '>>'", yyvsp[0].type );
- }
- break;
- case 175:
-
- { ins_f_byte(286 ); yyval.type = 5 ; }
- break;
- case 176:
-
- {
- int bad_arg = 0;
-
- if (exact_types) {
- if (!((((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-2].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) && !(yyvsp[-2].type & 0x0400 ) ) {
- type_error("Bad argument number 1 to '-'", yyvsp[-2].type );
- bad_arg++;
- }
- if (!((((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[0].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) && !(yyvsp[0].type & 0x0400 ) ) {
- type_error("Bad argument number 2 to '-'", yyvsp[0].type );
- bad_arg++;
- }
- }
- yyval.type = 5 ;
- if ((yyvsp[-2].type & 0x0400 ) || (yyvsp[0].type & 0x0400 ))
- yyval.type = 0x0400 | 5 ;
- if (!(yyvsp[-2].type & 0x0400 ) || !(yyvsp[0].type & 0x0400 )) {
- if (exact_types && yyval.type != 5 && !bad_arg)
- yyerror("Arguments to '-' don't match");
- yyval.type = 1 ;
- }
- ins_f_byte(287 );
- }
- break;
- case 178:
-
- {
- if (exact_types && !((((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-2].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument number 1 to '*'", yyvsp[-2].type );
- if (exact_types && !((((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[0].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument number 2 to '*'", yyvsp[0].type );
- ins_f_byte(288 );
- yyval.type = 1 ;
- }
- break;
- case 179:
-
- {
- if (exact_types && !((((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-2].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument number 1 to '%'", yyvsp[-2].type );
- if (exact_types && !((((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[0].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument number 2 to '%'", yyvsp[0].type );
- ins_f_byte(314 );
- yyval.type = 1 ;
- }
- break;
- case 180:
-
- {
- if (exact_types && !((((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-2].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-2].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-2].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument number 1 to '/'", yyvsp[-2].type );
- if (exact_types && !((((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[0].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument number 2 to '/'", yyvsp[0].type );
- ins_f_byte(289 );
- yyval.type = 1 ;
- }
- break;
- case 182:
-
- {
- yyval.type = yyvsp[-1].type ;
- if (exact_types && yyvsp[0].type != 5 && yyvsp[0].type != 0 &&
- yyvsp[-1].type != 3 )
- type_error("Casts are only legal for type mixed, or when unknown", yyvsp[0].type );
- }
- break;
- case 184:
-
- {
- ins_f_byte(278 );
- if (exact_types && !((((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[0].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument to ++", yyvsp[0].type );
- yyval.type = 1 ;
- }
- break;
- case 185:
-
- {
- ins_f_byte(279 );
- if (exact_types && !((((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[0].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument to --", yyvsp[0].type );
- yyval.type = 1 ;
- }
- break;
- case 186:
-
- {
- ins_f_byte(339 );
- yyval.type = 1 ;
- }
- break;
- case 187:
-
- {
- ins_f_byte(322 );
- if (exact_types && !((((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[0].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument to ~", yyvsp[0].type );
- yyval.type = 1 ;
- }
- break;
- case 188:
-
- {
- ins_f_byte(300 );
- if (exact_types && !((((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[0].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[0].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[0].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument to unary '-'", yyvsp[0].type );
- yyval.type = 1 ;
- }
- break;
- case 190:
-
- {
- ins_f_byte(280 );
- if (exact_types && !((((yyvsp[-1].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-1].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-1].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[-1].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-1].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument to ++", yyvsp[-1].type );
- yyval.type = 1 ;
- }
- break;
- case 191:
-
- {
- ins_f_byte(281 );
- if (exact_types && !((((yyvsp[-1].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-1].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-1].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[-1].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-1].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad argument to --", yyvsp[-1].type );
- yyval.type = 1 ;
- }
- break;
- case 193:
-
- {
- int pos = mem_block[ 0 ].current_size;
-
- if (last_push_identifier == pos-2)
- mem_block[ 0 ].block[last_push_identifier] =
- 272 - 257 ;
- else if (last_push_local == pos-2)
- mem_block[ 0 ].block[last_push_local] =
- 310 - 257 ;
- else if (last_push_indexed == pos-1)
- mem_block[ 0 ].block[last_push_indexed] =
- 268 - 257 ;
- else if (last_push_indexed != 0)
- fatal("Should be a push at this point !\n");
- yyval.type = yyvsp[0].type ;
- }
- break;
- case 196:
-
- { yyval.type = yyvsp[-1].type ; }
- break;
- case 197:
-
- { yyval.type = 5 ; }
- break;
- case 198:
-
- { yyval.type = 1 ; }
- break;
- case 199:
-
- { yyval.type = 1 ; }
- break;
- case 200:
-
- {
- pop_arg_stack(yyvsp[-2].number );
- ins_f_byte(320 );
- ins_short(yyvsp[-2].number );
- yyval.type = 0x0400 | 5 ;
- }
- break;
- case 201:
-
- {
- pop_arg_stack(yyvsp[-2].number );
- ins_f_byte(321 );
- ins_short(yyvsp[-2].number );
- yyval.type = 6 ;
- }
- break;
- case 202:
-
- { ins_f_byte(333 ); push_address(); ins_short(0);}
- break;
- case 203:
-
- {
- ins_f_byte(260 );
-
- ins_f_byte(269 );
- ins_f_byte(453 );
-
-
-
- upd_short(pop_address(),
- mem_block[ 0 ].current_size);
- }
- break;
- case 204:
-
- {
- ins_f_byte(307 ); ins_byte(yyvsp[-1].number + 2);
- }
- break;
- case 205:
-
- {
- ins_f_byte(308 ); ins_byte(yyvsp[-1].number + 3);
- }
- break;
- case 206:
-
- { yyval.number = 0; }
- break;
- case 207:
-
- { yyval.number = 1 + yyvsp[0].number ; }
- break;
- case 208:
-
- {
- int i = verify_declared(yyvsp[0].string );
- last_push_identifier = mem_block[ 0 ].current_size;
- ins_f_byte(264 );
- ins_byte(i);
- xfree(yyvsp[0].string );
- if (i == -1)
- yyval.type = 5 ;
- else
- yyval.type = ((struct variable *)mem_block[ 3 ].block + (i)) ->type & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ;
- }
- break;
- case 209:
-
- {
- last_push_local = mem_block[ 0 ].current_size;
- ins_f_byte(265 );
- ins_byte(yyvsp[0].number );
- yyval.type = type_of_locals[yyvsp[0].number ];
- }
- break;
- case 210:
-
- {
- ins_f_byte(467 );
- last_push_indexed = 0;
- if (exact_types) {
- if ((yyvsp[-5].type & 0x0400 ) == 0 && !((((yyvsp[-5].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-5].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 2 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 2 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-5].type ) & 0x0400 ) && (( 2 ) & 0x0400 ) && (((yyvsp[-5].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-5].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 2 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 2 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad type to indexed value", yyvsp[-5].type );
- if (!((((yyvsp[-3].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-3].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-3].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[-3].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-3].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad type of index", yyvsp[-3].type );
- if (!((((yyvsp[-1].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-1].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-1].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[-1].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-1].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad type of index", yyvsp[-1].type );
- }
- if (yyvsp[-5].type == 5 )
- yyval.type = 5 ;
- else if (((((yyvsp[-5].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-5].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 2 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 2 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-5].type ) & 0x0400 ) && (( 2 ) & 0x0400 ) && (((yyvsp[-5].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-5].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 2 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 2 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- yyval.type = 2 ;
- else if (yyvsp[-5].type & 0x0400 )
- yyval.type = yyvsp[-5].type ;
- else if (exact_types)
- type_error("Bad type of argument used for range", yyvsp[-5].type );
- }
- break;
- case 211:
-
- {
- last_push_indexed = mem_block[ 0 ].current_size;
- ins_f_byte(266 );
- if (exact_types && !(yyvsp[-3].type & 6 )) {
- if ((yyvsp[-3].type & 0x0400 ) == 0 && !((((yyvsp[-3].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-3].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 2 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 2 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-3].type ) & 0x0400 ) && (( 2 ) & 0x0400 ) && (((yyvsp[-3].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-3].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 2 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 2 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad type to indexed value", yyvsp[-3].type );
- if (!((((yyvsp[-1].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-1].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 1 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-1].type ) & 0x0400 ) && (( 1 ) & 0x0400 ) && (((yyvsp[-1].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-1].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 1 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- type_error("Bad type of index", yyvsp[-1].type );
- }
- if (yyvsp[-3].type == 5 )
- yyval.type = 5 ;
- else if (((((yyvsp[-3].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((yyvsp[-3].type ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( 2 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( 2 ) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((yyvsp[-3].type ) & 0x0400 ) && (( 2 ) & 0x0400 ) && (((yyvsp[-3].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((yyvsp[-3].type ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( 2 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( 2 ) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) )
- yyval.type = 1 ;
- else if (yyvsp[-3].type == 6 )
- yyval.type = 5 ;
- else
- yyval.type = yyvsp[-3].type & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 ;
- }
- break;
- case 212:
-
- {
- ins_f_byte(277 );
- ins_short(store_prog_string(yyvsp[0].string ));
- xfree(yyvsp[0].string );
- yyval.type = 2 ;
- }
- break;
- case 213:
-
- {
- char *p = make_shared_string(yyvsp[0].string );
- xfree(yyvsp[0].string );
- yyval.string = p;
- }
- break;
- case 215:
-
- {
- yyval.string = xalloc( strlen(yyvsp[-2].string ) + strlen(yyvsp[0].string ) + 1 );
- strcpy(yyval.string , yyvsp[-2].string );
- strcat(yyval.string , yyvsp[0].string );
- xfree(yyvsp[-2].string );
- xfree(yyvsp[0].string );
- }
- break;
- case 216:
-
- {
-
-
-
-
-
-
-
-
- yyval.funp = 0;
- if (defined_function(yyvsp[0].string , 0) == -1) {
- char *p = make_shared_string(yyvsp[0].string );
- yyval.funp = find_simul_efun(p);
- if (yyval.funp && !(yyval.funp ->type & 0x0100 )) {
- ins_f_byte(277 );
- ins_short(store_prog_string(
- query_simul_efun_file_name()));
- ins_f_byte(277 );
- ins_short(store_prog_string(p));
- } else {
- yyval.funp = 0;
- }
- free_string(p);
- }
- }
- break;
- case 217:
-
- {
- int f;
- int efun_override = strncmp(yyvsp[-4].string , "efun::", 6) == 0;
-
- if (yyvsp[-3].funp ) {
- ins_f_byte(351 );
- ins_byte(yyvsp[-1].number + 2);
-
- ins_short(-1);
-
- yyval.type = yyvsp[-3].funp ->type;
- } else if (!efun_override && (f = defined_function(yyvsp[-4].string , 0)) >= 0) {
- struct function *funp;
- ins_f_byte(263 ); ins_short(f);
- ins_byte(yyvsp[-1].number );
- funp = ((struct function *)mem_block[ 1 ].block + (f)) ;
- if (funp->flags & 0x2 )
- find_inherited(funp);
-
-
-
- if ((funp->flags & 0x2 ) &&
- !(funp->flags & 0x10 ) && exact_types)
- {
- char buff[100];
- sprintf(buff, "Function %.50s undefined", funp->name);
- yyerror(buff);
- }
- yyval.type = funp->type & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ;
-
-
-
- if (funp->num_arg != yyvsp[-1].number && !(funp->type & 0x4000 ) &&
- (funp->flags & 0x4 ) && exact_types)
- {
- char buff[100];
- sprintf(buff, "Wrong number of arguments to %.60s", yyvsp[-4].string );
- yyerror(buff);
- }
-
-
-
- if (exact_types && *(unsigned short *)&mem_block[7 ].block[f * sizeof (unsigned short)] != 65535 )
- {
- int i, first;
- unsigned short *arg_types;
-
- arg_types = (unsigned short *)
- mem_block[6 ].block;
- first = *(unsigned short *)&mem_block[7 ].block[f * sizeof (unsigned short)];
- for (i=0; i < funp->num_arg && i < yyvsp[-1].number ; i++) {
- int tmp = get_argument_type(i, yyvsp[-1].number );
- if (!((((tmp) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((tmp) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( arg_types[first + i]) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( arg_types[first + i]) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((tmp) & 0x0400 ) && (( arg_types[first + i]) & 0x0400 ) && (((tmp) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((tmp) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( arg_types[first + i]) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( arg_types[first + i]) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) ) {
- char buff[100];
- sprintf(buff, "Bad type for argument %d %s", i+1,
- get_two_types(arg_types[first+i], tmp));
- yyerror(buff);
- }
- }
- }
- } else if (efun_override || (f = lookup_predef(yyvsp[-4].string )) != -1) {
- int min, max, def, *argp;
- extern int efun_arg_types[];
-
- if (efun_override) {
- f = lookup_predef(yyvsp[-4].string +6);
- }
- if (f == -1) {
- char buff[100];
- sprintf(buff, "Unknown efun: %s", yyvsp[-4].string +6);
- yyerror(buff);
- } else {
- min = instrs[f- 257 ].min_arg;
- max = instrs[f- 257 ].max_arg;
- def = instrs[f- 257 ].Default;
- yyval.type = instrs[f- 257 ].ret_type;
- argp = &efun_arg_types[instrs[f- 257 ].arg_index];
- if (def && yyvsp[-1].number == min-1) {
- ins_f_byte(def);
- max--;
- min--;
- } else if (yyvsp[-1].number < min) {
- char bff[100];
- sprintf(bff, "Too few arguments to %s",
- instrs[f- 257 ].name);
- yyerror(bff);
- } else if (yyvsp[-1].number > max && max != -1) {
- char bff[100];
- sprintf(bff, "Too many arguments to %s",
- instrs[f- 257 ].name);
- yyerror(bff);
- } else if (max != -1 && exact_types) {
-
-
-
- int i, argn;
- char buff[100];
- for (argn=0; argn < yyvsp[-1].number ; argn++) {
- int tmp = get_argument_type(argn, yyvsp[-1].number );
- for(i=0; !((((argp[i]) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 || ((argp[i]) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == ( ( tmp) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) || ( ( tmp) & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ) == 5 ) || (((argp[i]) & 0x0400 ) && (( tmp) & 0x0400 ) && (((argp[i]) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 || ((argp[i]) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == ( ( tmp) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) || ( ( tmp) & ( (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) & ~0x0400 )) == 5 ) )) && argp[i] != 0; i++)
- ;
- if (argp[i] == 0) {
- sprintf(buff, "Bad argument %d type to efun %s()",
- argn+1, instrs[f- 257 ].name);
- yyerror(buff);
- }
- while(argp[i] != 0)
- i++;
- argp += i + 1;
- }
- }
- ins_f_byte(f);
-
-
-
- if (max != min)
- ins_byte(yyvsp[-1].number );
-
- if (f == 351 )
- ins_short(-1);
-
- }
- } else {
- struct function *funp;
-
- f = define_new_function(yyvsp[-4].string , 0, 0, 0, 0x2 , 0);
- ins_f_byte(263 );
- ins_short(f);
- ins_byte(yyvsp[-1].number );
- funp = ((struct function *)mem_block[ 1 ].block + (f)) ;
- if (strchr(yyvsp[-4].string , ':')) {
-
-
-
-
- find_inherited(funp);
- }
-
-
-
-
-
- if (exact_types && (funp->flags & 0x2 )) {
- char buff[100];
- sprintf(buff, "Undefined function %.50s", yyvsp[-4].string );
- yyerror(buff);
- }
- if (!(funp->flags & 0x2 ))
- yyval.type = funp->type & (~( 0x0100 | 0x0200 | 0x0800 | 0x1000 | 0x2000 | 0x4000 )) ;
- else
- yyval.type = 5 ;
- }
- xfree(yyvsp[-4].string );
- pop_arg_stack(yyvsp[-1].number );
- }
- break;
- case 218:
-
- {
- ins_f_byte(277 );
- ins_short(store_prog_string(yyvsp[0].string ));
- xfree(yyvsp[0].string );
- }
- break;
- case 219:
-
- {
- ins_f_byte(351 );
- ins_byte(yyvsp[-1].number + 2);
- yyval.type = 0 ;
-
-
- ins_short(-1);
-
-
- pop_arg_stack(yyvsp[-1].number );
- }
- break;
- case 221:
-
- {
- char *p = xalloc(strlen(yyvsp[0].string ) + 3);
- strcpy(p, "::"); strcat(p, yyvsp[0].string ); xfree(yyvsp[0].string );
- yyval.string = p;
- }
- break;
- case 222:
-
- {
- char *p = xalloc(strlen(yyvsp[-2].string ) + strlen(yyvsp[0].string ) + 3);
- strcpy(p, yyvsp[-2].string ); strcat(p, "::"); strcat(p, yyvsp[0].string );
- xfree(yyvsp[-2].string ); xfree(yyvsp[0].string );
- yyval.string = p;
- }
- break;
- case 223:
-
- {
- char *p = xalloc(strlen(local_names[yyvsp[0].number ]) + 1);
- strcpy(p, local_names[yyvsp[0].number ]);
- yyval.string = p;
- }
- break;
- case 225:
-
- {
- int i;
- i = pop_address();
- ins_f_byte(257 ); push_address(); ins_short(0);
- upd_short(i, mem_block[ 0 ].current_size);
- }
- break;
- case 226:
-
- { upd_short(pop_address(), mem_block[ 0 ].current_size); }
- break;
- case 227:
-
- {
- ins_f_byte(258 );
- push_address();
- ins_short(0);
- }
- break;
-
- }
- yyssp -= yym;
- yystate = *yyssp;
- yyvsp -= yym;
- yym = yylhs[yyn];
- if (yystate == 0 && yym == 0)
- {
-
- if (yydebug)
- printf("yydebug: after reduction, shifting from state 0 to state %d\n", 1 );
-
-
- yystate = 1 ;
- *++yyssp = 1 ;
- *++yyvsp = yyval;
- if (yychar < 0)
- {
- if ((yychar = yylex()) < 0) yychar = 0;
-
- }
- if (yychar == 0) goto yyaccept;
- goto yyloop;
- }
- if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
- yyn <= 2153 && yycheck[yyn] == yystate)
- yystate = yytable[yyn];
- else
- yystate = yydgoto[yym];
-
- if (yydebug)
- printf("yydebug: after reduction, shifting from state %d to state %d\n", *yyssp, yystate);
-
-
- if (yyssp >= yyss + 600 - 1)
- {
- goto yyoverflow;
- }
- *++yyssp = yystate;
- *++yyvsp = yyval;
- goto yyloop;
- yyoverflow:
- yyerror("yacc stack overflow");
- yyabort:
- return (1);
- yyaccept:
- return (0);
- }
-